When a field changed on BOTH sides since the last sync (a true bidirectional
conflict) and the entity map's ConflictResolution policy is MostRecent, the side
that was modified more recently wins. This compares the MJ row's last-update time
against the external record's modified time at RECORD granularity (most sources
don't expose per-field timestamps), and returns null when either timestamp is
missing/unparseable so the caller can fall back to DestWins — a conflict is never
silently dropped on missing data.
Pure + dependency-free so it is cheaply unit-testable; the engine wires it to
__mj_UpdatedAt (MJ side) and ExternalRecord.ModifiedAt (external side).
"MostRecent" conflict resolution helper.
When a field changed on BOTH sides since the last sync (a true bidirectional conflict) and the entity map's ConflictResolution policy is
MostRecent, the side that was modified more recently wins. This compares the MJ row's last-update time against the external record's modified time at RECORD granularity (most sources don't expose per-field timestamps), and returns null when either timestamp is missing/unparseable so the caller can fall back to DestWins — a conflict is never silently dropped on missing data.Pure + dependency-free so it is cheaply unit-testable; the engine wires it to
__mj_UpdatedAt(MJ side) andExternalRecord.ModifiedAt(external side).