mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
15e3e9cdcc
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.
41 lines
905 B
YAML
41 lines
905 B
YAML
membership_of_boring_club:
|
|
joined_on: <%= 3.weeks.ago.to_s(:db) %>
|
|
club: boring_club
|
|
member_id: 1
|
|
favourite: false
|
|
type: CurrentMembership
|
|
|
|
membership_of_favourite_club:
|
|
joined_on: <%= 3.weeks.ago.to_s(:db) %>
|
|
club: moustache_club
|
|
member_id: 1
|
|
favourite: true
|
|
type: Membership
|
|
|
|
other_guys_membership:
|
|
joined_on: <%= 4.weeks.ago.to_s(:db) %>
|
|
club: boring_club
|
|
member_id: 2
|
|
favourite: false
|
|
type: CurrentMembership
|
|
|
|
blarpy_winkup_crazy_club:
|
|
joined_on: <%= 4.weeks.ago.to_s(:db) %>
|
|
club: crazy_club
|
|
member_id: 3
|
|
favourite: false
|
|
type: CurrentMembership
|
|
|
|
super_membership_of_boring_club:
|
|
joined_on: <%= 3.weeks.ago.to_s(:db) %>
|
|
club: boring_club
|
|
member_id: 1
|
|
favourite: false
|
|
type: SuperMembership
|
|
|
|
selected_membership_of_boring_club:
|
|
joined_on: <%= 3.weeks.ago.to_s(:db) %>
|
|
club: boring_club
|
|
member_id: 1
|
|
favourite: false
|
|
type: SelectedMembership
|