-
Type: Bug
-
Resolution: Fixed
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: Attributes
-
None
-
Fully Compatible
In testing for MONGOID-5199 neil.shweky found the following curious case:
Band.with_session do |s| s.start_transaction label = Label.new(name: "Neil") b = Band.new(label: label) b.save! b.label = nil b.label = label b.reload puts b.label # nil s.commit_transaction end
This code appears to print a stale changed value, which regardless of whether reload should reset attribute changes does not appear to be correct.
- is cloned by
-
MONGOID-5235 Add Feature Flag: Reloading retains stale changed value
- Closed
- is related to
-
MONGOID-5208 Error when reloading with a nil embedded field
- Closed
- related to
-
MONGOID-5199 Reloadable#reload_embedded_document doesn't respect session
- Closed
-
MONGOID-5238 Add Feature Flag: Reloadable#reload_embedded_document doesn't respect session
- Closed
-
MONGOID-5205 Document reloading behavior for changed attributes
- Closed
-
MONGOID-5240 embeds_many does not get reset after clear
- Closed