Skip to content

Fix eager loading to respect store_full_sti_class setting #29601

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

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Jun 28, 2017

No description provided.

@rafaelfranca
Copy link
Member

Could you add a CHANGELOG entry?

@rafaelfranca rafaelfranca self-requested a review June 28, 2017 16:33
@rafaelfranca rafaelfranca self-assigned this Jun 28, 2017
@kamipo kamipo force-pushed the fix_eager_loading_to_respect_store_full_sti_class branch from 3f93344 to b084fe9 Compare June 28, 2017 16:40
@kamipo
Copy link
Member Author

kamipo commented Jun 28, 2017

I added a CHANGELOG entry!

@rafaelfranca rafaelfranca merged commit b084fe9 into rails:master Jun 28, 2017
rafaelfranca added a commit that referenced this pull request Jun 28, 2017
…ore_full_sti_class

Fix eager loading to respect `store_full_sti_class` setting
@kamipo kamipo deleted the fix_eager_loading_to_respect_store_full_sti_class branch June 28, 2017 18:51
kamipo added a commit to kamipo/rails that referenced this pull request Feb 18, 2018
This is an alternative of rails#29722, and revert of rails#29601 and a1fcbd9.

Currently, association creation and normal association finding doesn't
respect `store_full_sti_class`. But eager loading and preloading respect
the setting. This means that if set `store_full_sti_class = false`
(`true` by default), eager loading and preloading can not find
created polymorphic records.

Association creation and finding should work consistently.
kamipo added a commit that referenced this pull request Feb 25, 2018
This is an alternative of #29722, and revert of #29601 and a1fcbd9.

Currently, association creation and normal association finding doesn't
respect `store_full_sti_class`. But eager loading and preloading respect
the setting. This means that if set `store_full_sti_class = false`
(`true` by default), eager loading and preloading can not find
created polymorphic records.

Association creation and finding should work consistently.
kamipo added a commit that referenced this pull request Feb 28, 2018
This is an alternative of #29722, and revert of #29601 and a1fcbd9.

Currently, association creation and normal association finding doesn't
respect `store_full_sti_class`. But eager loading and preloading respect
the setting. This means that if set `store_full_sti_class = false`
(`true` by default), eager loading and preloading can not find
created polymorphic records.

Association creation and finding should work consistently.
kamipo added a commit that referenced this pull request Feb 28, 2018
kamipo added a commit to kamipo/rails that referenced this pull request Aug 23, 2020
This is an alternative of rails#29722.

Before Rails 6.1, storing demodulized class name is supported only for
STI type by `store_full_sti_class` class attribute.

Now `store_full_class_name` class attribute can handle both STI and
polymorphic types.

Closes rails#29722.

See also rails#29601, rails#32048, rails#32148.
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