mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove object from identity map if transaction failed.
This commit is contained in:
parent
eebf33a234
commit
e88fd0230f
1 changed files with 1 additions and 0 deletions
|
@ -247,6 +247,7 @@ module ActiveRecord
|
|||
remember_transaction_record_state
|
||||
yield
|
||||
rescue Exception
|
||||
IdentityMap.remove(self) if IdentityMap.enabled?
|
||||
restore_transaction_record_state
|
||||
raise
|
||||
ensure
|
||||
|
|
Loading…
Reference in a new issue