Skip to content

Commit 5b92bf7

Browse files
authored
Merge pull request rails#51410 from nvasilevski/add-composite-association-pk-fk-to-changelog
Add CHANGELOG entries for association composite primary and foreign keys
2 parents 246b3b6 + 3df4d69 commit 5b92bf7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

activerecord/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
* Allow association's `foreign_key` to be composite
2+
3+
`query_constraints` option was the only way to configure a composite foreign key by passing an `Array`.
4+
Now it's possible to pass an Array value as `foreign_key` to achieve the same behavior of an association.
5+
6+
*Nikita Vasilevsky*
7+
8+
* Allow association's `primary_key` to be composite
9+
10+
Association's `primary_key` can be composite when derived from associated model `primary_key` or `query_constraints`.
11+
Now it's possible to explicitly set it as composite on the association.
12+
13+
*Nikita Vasilevsky*
14+
115
* Add `config.active_record.permanent_connection_checkout` setting.
216

317
Controls whether `ActiveRecord::Base.connection` raises an error, emits a deprecation warning, or neither.

0 commit comments

Comments
 (0)