Closed marsadle closed 3 years ago
It should work if you declare the association that you are trying to load in the root class
That much I know, my issue is, that I can't do that.
Can you provide a standalone script that would reproduce the issue? If so, it'll be much easier to me to make a fix Thank you :))
I'm closing this issue due to its age but in the case it looks still relevant, please feel free to update it!
Polymorphism with NoBrainer works great, for normal queries, but I need eager_loading, to speed up the code.
Right now it isn't possible to
eager_load
an association on a subclass, because NoBrainer always fetches the associations fromroot_class
, which leads to anUnknown association
error. This means, I can't preload any data and the library will load each model individually.Is there a possible workaround for this, or will this be a feature in the future?