-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: Associations, Persistence
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Background
Users consider embedded associations equivalent to fields. As noted in MONGOID-4843, Mongoid tracks changes on fields, but does not track changes on embedded associations.
To get around this, some users use a gem mongoid_relations_dirty_tracking which is a hack to add changes tracking.
Requirement
- Mongoid's "changes" and "changed_attributes" methods should track changes to embedded docs, using a hash structure.
- The changes should be tracked for N-levels of nested embedding.
- mongoid_relations_dirty_tracking should be looked at as a model implementation.
- Tracking on the fields of a doc's referenced relations is not needed.