diff options
author | Dominic Cleal <dominic@cleal.org> | 2016-10-07 08:56:05 +0100 |
---|---|---|
committer | Dominic Cleal <dominic@cleal.org> | 2016-11-24 09:29:40 +0000 |
commit | 935502062e647def60288944808240667f7893cc (patch) | |
tree | 0d00de76bc70f2808a0d78185eca3db1790674f5 /activerecord/CHANGELOG.md | |
parent | 15e2da656f41af0124f7577858536f3b65462ad5 (diff) | |
download | rails-935502062e647def60288944808240667f7893cc.tar.gz rails-935502062e647def60288944808240667f7893cc.tar.bz2 rails-935502062e647def60288944808240667f7893cc.zip |
Add test for collection *_ids= setter when association primary key set
Fixes casting of IDs to the data type of the association primary key,
rather than then the data type of the model's primary key. (Tests use a
string primary key on the association, rather than an int.)
Tests issue #20995
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index f4218cc110..35f7c158a6 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,6 +1,10 @@ * Raise ActiveRecord::RecordNotFound from collection `*_ids` setters for unknown IDs with a better error message. + Changes the collection `*_ids` setters to cast provided IDs the data + type of the primary key set in the association, not the model + primary key. + *Dominic Cleal* * For PostgreSQL >= 9.4 use `pgcrypto`'s `gen_random_uuid()` instead of |