diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-05-02 06:35:25 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-05-25 23:57:09 +0900 |
commit | 6edf354b656ec556c3573402019504a519531953 (patch) | |
tree | d6d772aa578bd9594fc1e78fe610dcff86fb0a8b /railties/test/commands/credentials_test.rb | |
parent | 8a600183550298a1f350a8fa8d72630da607fb60 (diff) | |
download | rails-6edf354b656ec556c3573402019504a519531953.tar.gz rails-6edf354b656ec556c3573402019504a519531953.tar.bz2 rails-6edf354b656ec556c3573402019504a519531953.zip |
Eager loading won't mutate owner record
Since #31575, `BelongsToAssociation#target=` replaces owner record's
foreign key to fix an inverse association bug.
But the method is not only used for inverse association but also used
for eager loading/preloading, it caused some public behavior changes
(#32338, #32375).
To avoid any side-effect in loading associations, I reverted the
overriding `#target=`, then introduced `#inversed_from` to replace
foreign key in `set_inverse_instance`.
Closes #32375.
Diffstat (limited to 'railties/test/commands/credentials_test.rb')
0 files changed, 0 insertions, 0 deletions