-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
def reload_embedded_document
extract_embedded_attributes({}.merge(
collection(_root).find(_root.atomic_selector).read(mode: :primary).first
))
end
This find call should be
collection.find(atomic_selector, session: _session)
as in the method call above it, causes the find to return nil during a transaction (where the record was created inside it, but it has yet to be committed) and then we merge in nil and raise error
- is cloned by
-
MONGOID-5238 Add Feature Flag: Reloadable#reload_embedded_document doesn't respect session
- Closed
- is related to
-
MONGOID-5206 Reloading retains stale changed value
- Closed
-
MONGOID-5235 Add Feature Flag: Reloading retains stale changed value
- Closed
-
MONGOID-5208 Error when reloading with a nil embedded field
- Closed
-
MONGOID-5205 Document reloading behavior for changed attributes
- Closed