You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a belongs_to association where the foreign key attribute has been aliased, the association is always loaded as nil even when the foreign key attribute is populated.
The text was updated successfully, but these errors were encountered:
solnic
changed the title
Belongs_to associations not being loaded when foreign key is an alias
ManyToOne associations not being loaded when foreign key is an alias
Apr 27, 2019
Describe the bug
If you have a
belongs_to
association where the foreign key attribute has been aliased, the association is always loaded asnil
even when the foreign key attribute is populated.To Reproduce
or
Expected behavior
I would expected that foreign key inference is not affected by aliasing the attribute at the application level.
Your environment
Resources
Original source in the discussion forum
The text was updated successfully, but these errors were encountered: