May I ask what strategy you picked? Relying on last updatedAt
field seems to be problematic when let’s say two persons are updating the same objects, but they change a different field. For example:
- User A modifies
fieldA = 20
and is in poor connectivity area. He keeps thefieldB = 50
untouched. - Meanwhile a user B sets
fieldB = 55
, before the User A gets connected - User A then gets signal and rewrites the fields back or if strictly checked by passing a “saving date” inside
context
the update could get rejected inbeforeSave
with message that newer object is available. But in that case the update onfieldA
is getting lost, as the most recent state wins and that state does not havefieldA
updated
I was thinking about having separate updatedAt
for each field in nested object as mentioned here.
But I am not sure if that is a reasonable way and would make rather more sense to go for VectorVersions (seems difficult when I have fields not as Strings, just numbers for later ElasticSearch indexing)…