-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
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
- clones
-
MONGOID-5199 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