1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

6 commits

Author SHA1 Message Date
Ryuta Kamizono
15e3e9cdcc 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.
2018-06-19 22:21:51 +09:00
Jon Leighton
1dd90f8f12 Don't use select() values from the join model of a through association. Fixes #508. 2011-05-11 08:56:01 +01:00
Jon Leighton
002985fb66 Add test_has_one_through_has_one_through_with_belongs_to_source_reflection 2010-10-14 13:44:32 +01:00
Jon Leighton
1777600e6e Support has_one through assocs as the source association 2010-10-12 16:40:24 +01:00
Santiago Pastorino
b451de0d6d Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
Rick Olson
273b21faa9 Add has_one :through support, finally. Closes #4756 [thechrisoshow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 18:09:03 +00:00