aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md22
1 files changed, 20 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 824e9d4258..7404c1bd8f 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,21 @@
+* Fix transactions to apply state to child transactions
+
+ Previously if you had a nested transaction and the outer transaction was rolledback the record from the
+ inner transaction would still be marked as persisted.
+
+ This change fixes that by applying the state of the parent transaction to the child transaction when the
+ parent transaction is rolledback. This will correctly mark records from the inner transaction as not persisted.
+
+ *Eileen M. Uchitelle*, *Aaron Patterson*
+
+* Deprecate `set_state` method in `TransactionState`
+
+ Deprecated the `set_state` method in favor of setting the state via specific methods. If you need to mark the
+ state of the transaction you can now use `rollback!`, `commit!` or `nullify!` instead of
+ `set_state(:rolledback)`, `set_state(:committed)`, or `set_state(nil)`.
+
+ *Eileen M. Uchitelle*, *Aaron Patterson*
+
* Deprecate delegating to `arel` in `Relation`.
*Ryuta Kamizono*
@@ -6,7 +24,7 @@
*Ryuta Kamizono*
-* Query cache was unavailable when entering the ActiveRecord::Base.cache block
+* Query cache was unavailable when entering the `ActiveRecord::Base.cache` block
without being connected.
*Tsukasa Oishi*
@@ -40,7 +58,7 @@
*bogdanvlviv*
* Fix destroying existing object does not work well when optimistic locking enabled and
- `locking column` is null in the database.
+ `locking_column` is null in the database.
*bogdanvlviv*