-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
MONGOID-5839 Fix eager-loading from STI subclasses #5934
Conversation
If the root of a query is an STI subclass (e.g. `Subclass.all`) AND the query tries to eager load (`includes`) another association, the eager load was failing because it was looking for inverse associations using the STI subclass name, instead of the class at the root of the hierarchy.
I just tried and the fix work with Mongoid 8.0.8. Thanks. I had to change because the model I used didn't include
|
Any update on this? |
@stanley90 sorry, some illness and a long weekend left this one in a bit of limbo. I hope to push it across the finish line (and backport it as necessary) in the next couple of days. |
If the root of a query is an STI subclass (e.g. `Subclass.all`) AND the query tries to eager load (`includes`) another association, the eager load was failing because it was looking for inverse associations using the STI subclass name, instead of the class at the root of the hierarchy.
If the root of a query is an STI subclass (e.g. `Subclass.all`) AND the query tries to eager load (`includes`) another association, the eager load was failing because it was looking for inverse associations using the STI subclass name, instead of the class at the root of the hierarchy.
If the root of a query is an STI subclass (e.g. `Subclass.all`) AND the query tries to eager load (`includes`) another association, the eager load was failing because it was looking for inverse associations using the STI subclass name, instead of the class at the root of the hierarchy.
If the root of a query is an STI subclass (e.g. `Subclass.all`) AND the query tries to eager load (`includes`) another association, the eager load was failing because it was looking for inverse associations using the STI subclass name, instead of the class at the root of the hierarchy.
Hi, me again. It's been fixed for a while, but could we get a release? It's biting me quite a bit. Thx |
8.0.9 has been released. Patch releases for 8.1.x and 9.0.x are forthcoming (probably tomorrow). |
8.1.9 and 9.0.5 are released now, as well: https://www.mongodb.com/community/forums/t/mongoid-maintenance-releases-now-available-9-0-5-8-1-9-8-0-9/311172 |
Thanks! |
If the root of a query is an STI subclass (e.g.
Subclass.all
) AND the query tries to eager load (includes
) another association, the eager load was failing because it was looking for inverse associations using the STI subclass name, instead of the class at the root of the hierarchy.