-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:
Under 2.0.0.rc.8, when you update a root document that only has changes on embedded documents (embeds_one or embeds_many) then the root document's updated_at value isn't updated. Under 2.0.0.beta.20, the updated_at column was updated for changes on embedded documents.
This caused a bug in our application where we fed content updates via a changes API driven by a 'changed since' timestamp that looked at the root document's updated_at. The embedded documents don't carry an updated_at field. Since the updated_at field wasn't getting updated, content changes were not being picked up by clients.
Exactly how this should behave is debatable, depending on how strong the relation is between the models within the application's domain, but given that the updated_at field is driven by callbacks, and callbacks aren't fired for embedded documents, and that this is a change between the beta and RC versions, I think it's best to have the root document's updated_at field updated when embedded documents change.