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
Fix STI in available_records causing new instances of records to be loaded from database #43524
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice change!
Left 1 question I am unsure about, other than that lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, can you squash your commits into one and make sure the one commit explains the change?
3d5183d
to
355deb4
Compare
…oaded from database Removes grouping by available_record class names in ActiveRecord::Associations::Preloader::Batch so that records of differing STI classes can be located.
355deb4
to
2d988d0
Compare
@octatone Was there an associated issue with this PR or just something you picked up on and posted a patch? |
There's no public issue, this was found in the GitHub app @zzak. |
Summary
Fixes bug in ActiveRecord::Associations::Preloader causing unnecessary refetching of records by removing grouping by available_record class names.