aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/reload_models_test.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-06-14 23:48:01 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-06-19 22:21:51 +0900
commit15e3e9cdccd8ab0d204ed9e74bf7916d6025d405 (patch)
tree2b5588e1f5936fabd7ee6b12a883b00799ce7f81 /activerecord/test/cases/reload_models_test.rb
parent2be5ef6a1d5baebcb749c42a48628c741570fd73 (diff)
downloadrails-15e3e9cdccd8ab0d204ed9e74bf7916d6025d405.tar.gz
rails-15e3e9cdccd8ab0d204ed9e74bf7916d6025d405.tar.bz2
rails-15e3e9cdccd8ab0d204ed9e74bf7916d6025d405.zip
Ensure to calculate column aliases after all table aliases are constructed
Currently, column aliases which is used for eager loading are calculated before constructing all table aliases in FROM clause. `JoinDependency#join_constraints` constructs table aliases for `joins` first, and then always re-constructs table aliases for eager loading. If both `joins` and eager loading are given a same table association, the re-construction would cause the discrepancy between column aliases and table aliases. To avoid the discrepancy, the column aliases should be calculated after all table aliases are constructed. Fixes #30603.
Diffstat (limited to 'activerecord/test/cases/reload_models_test.rb')
0 files changed, 0 insertions, 0 deletions