diff options
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 3bd1fe32b4..8808574df5 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,7 +1,52 @@ +* 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`. + + Fixes #10865. + + *Sean Griffin* + +* Foreign keys added by migrations were given random, generated names. This + meant a different `structure.sql` would be generated every time a developer + ran migrations on their machine. + + The generated part of foreign key names is now a hash of the table name and + column name, which is consistent every time you run the migration. + + *Chris Sinjakli* + +* Validation errors would be raised for parent records when an association + was saved when the parent had `validate: false`. It should not be the + responsibility of the model to validate an associated object unless the + object was created or modified by the parent. + + This fixes the issue by skipping validations if the parent record is + persisted, not changed, and not marked for destruction. + + Fixes #17621. + + *Eileen M. Uchitelle, Aaron Patterson* + +* Fix n+1 query problem when eager loading nil associations (fixes #18312) + + *Sammy Larbi* + +* Change the default error message from `can't be blank` to `must exist` for + the presence validator of the `:required` option on `belongs_to`/`has_one` associations. + + *Henrik Nygren* + * Fixed ActiveRecord::Relation#group method when argument is SQL reserved key word: - SplitTest.group(:key).count - Property.group(:value).count + Example: + + SplitTest.group(:key).count + Property.group(:value).count *Bogdan Gusiev* @@ -86,7 +131,7 @@ A deprecation warning will be emitted if you have a `:time` column, and have not explicitly opted out. - Fixes #3145 + Fixes #3145. *Sean Griffin* |