aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2015-02-04 08:44:48 -0700
committerSean Griffin <sean@thoughtbot.com>2015-02-04 08:56:46 -0700
commitcd0ed12d1a9edc73be953d700748b5827df890c7 (patch)
tree86d2e0f466213a95f360164e421665bde5a6bdcd /activerecord/CHANGELOG.md
parent1405c7a2cb3539880ebd82c287040b55d289a427 (diff)
downloadrails-cd0ed12d1a9edc73be953d700748b5827df890c7.tar.gz
rails-cd0ed12d1a9edc73be953d700748b5827df890c7.tar.bz2
rails-cd0ed12d1a9edc73be953d700748b5827df890c7.zip
Respect custom primary keys for associations in `Relation#where`
While we query the proper columns, we go through normal handling for converting the value to a primitive which assumes it should use the table's primary key. If the association specifies a different value (and we know that we're working with an association), we should use the custom primary key instead. Fixes #18813.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 0105dfa78c..8808574df5 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,9 @@
+* Respect custom primary keys for associations when calling `Relation#where`
+
+ Fixes #18813.
+
+ *Sean Griffin*
+
* Fixed several edge cases which could result in a counter cache updating
twice or not updating at all for `has_many` and `has_many :through`.