Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MONGOID-5839 Fix eager-loading from STI subclasses (backport to 8.1) #5941

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

jamis
Copy link
Contributor

@jamis jamis commented Jan 22, 2025

(backport to 8.1)

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.
@jamis jamis requested a review from comandeo-mongo January 22, 2025 15:57
@jamis jamis merged commit 6d5cf81 into mongodb:8.1-stable Jan 22, 2025
53 of 58 checks passed
@jamis jamis deleted the 5839-eager-loading-sti-8.1 branch January 22, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants