aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/railties/databases.rake
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-12-21 12:27:49 +0100
committerYves Senn <yves.senn@gmail.com>2015-12-21 12:31:52 +0100
commitb06f6a1d8c7c09841c6829b788c6560b70eb36a7 (patch)
tree496ee4e6970147888d9502972b3fd2aae2cdaddb /activerecord/lib/active_record/railties/databases.rake
parent078d7c9de79dfa7f5758d52ae67c1157d8ecfe36 (diff)
downloadrails-b06f6a1d8c7c09841c6829b788c6560b70eb36a7.tar.gz
rails-b06f6a1d8c7c09841c6829b788c6560b70eb36a7.tar.bz2
rails-b06f6a1d8c7c09841c6829b788c6560b70eb36a7.zip
Revert "Merge pull request #22486 from methyl/fix-includes-for-groupped-association"
This reverts commit 537ac7d6ade61e95f2b70685ff2236b7de965bab, reversing changes made to 9c9c54abe08d86967efd3dcac1d65158a0ff74ea. Reason: The way we preload associations will change the meaning of GROUP BY operations. This is illustrated in the SQL generated by the added test (failing on PG): Association Load: D, [2015-12-21T12:26:07.169920 #26969] DEBUG -- : Post Load (0.7ms) SELECT "posts".* FROM "posts" LEFT JOIN comments ON comments.post_id = posts.id WHERE "posts"."author_id" = $1 GROUP BY posts.id ORDER BY SUM(comments.tags_count) [["author_id", 1]] Preload: D, [2015-12-21T12:26:07.128305 #26969] DEBUG -- : Post Load (1.3ms) SELECT "posts".* FROM "posts" LEFT JOIN comments ON comments.post_id = posts.id WHERE "posts"."author_id" IN (1, 2, 3) GROUP BY posts.id ORDER BY SUM(comments.tags_count)
Diffstat (limited to 'activerecord/lib/active_record/railties/databases.rake')
0 files changed, 0 insertions, 0 deletions