diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-06-21 14:20:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-21 14:20:46 -0400 |
commit | 0c32bbd240ec8bcb56a60951a3a1c9ae2017240a (patch) | |
tree | cc496b04e0ad39772ddd29d52752c1b02374b2b9 /activerecord/CHANGELOG.md | |
parent | ab0e4558816b1a69b4e96446ffe2812e21053b42 (diff) | |
parent | 249ddd0c39e6f24145ae1150d4c8eec9f11219b1 (diff) | |
download | rails-0c32bbd240ec8bcb56a60951a3a1c9ae2017240a.tar.gz rails-0c32bbd240ec8bcb56a60951a3a1c9ae2017240a.tar.bz2 rails-0c32bbd240ec8bcb56a60951a3a1c9ae2017240a.zip |
Merge pull request #27063 from MaxLap/merge_keep_inner_join
Keep INNER JOIN when merging relations
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index c4ee75c9a2..d4f4041910 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,19 @@ +* Merging two relations representing nested joins no longer transforms the joins of + the merged relation into LEFT OUTER JOIN. Example to clarify: + + ``` + Author.joins(:posts).merge(Post.joins(:comments)) + # Before the change: + #=> SELECT ... FROM authors INNER JOIN posts ON ... LEFT OUTER JOIN comments ON... + + # After the change: + #=> SELECT ... FROM authors INNER JOIN posts ON ... INNER JOIN comments ON... + ``` + + TODO: Add to the Rails 5.2 upgrade guide + + *Maxime Handfield Lapointe* + * `ActiveRecord::Persistence#touch` does not work well when optimistic locking enabled and `locking_column`, without default value, is null in the database. |