-
Type: Bug
-
Resolution: Incomplete
-
Priority: Major - P3
-
None
-
Affects Version/s: 7.1.0
-
Component/s: Associations
-
None
when I try to set an embeds_many relation to an empty array, it removes the embedded relation from the document and it's not tracking the changes anymore, which is not desired, as there was a change on the document. Also this causes inconsistencies in the data as the data is lost and there is no way to know that it was unset.
I read through some closed issues and apparently this is somehow a known behaviour, is there any way to prevent this from happening ?
Some background:
We are tracking the changes on objects and it's important to know if there was a change on the associations as well.
- is related to
-
MONGOID-4869 Setting an embeds_many association to empty array does not persist it when a document is created
- Closed