-
Notifications
You must be signed in to change notification settings - Fork 898
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
Add MiqPreloader.polymorphic_preload_for_child_classes #17457
Add MiqPreloader.polymorphic_preload_for_child_classes #17457
Conversation
28af494
to
2f971d5
Compare
This is a specialized preloader for classes with polymorphic relationships that allows for targeted preloading for those specific class types on said polymorphic relationships. This allows for taking advantage of those associations by allowing scopes to be applied to the specific relationships and subsequent calls to the relationship can have those query definitions applied.
Checked commit NickLaMuro@2f971d5 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 lib/miq_preloader.rb
|
The above If desired, I could make a commit to fix the |
This pull request has been automatically closed because it has not been updated for at least 6 months. Feel free to reopen this pull request if these changes are still valid. Thank you for all your contributions! |
This branch was extracted from #17354 to bring attention to the large addition to
MiqPreloader
, which adds a new method:This is a specialized preloader for classes with polymorphic relationships that allows for targeted preloading for those specific class types on said polymorphic relationships. This allows for taking
advantage of those associations by allowing scopes to be applied to the specific relationships and subsequent calls to the relationship can have those query definitions applied.
This means you can do things like this:
Links