We can avoid the re-read if the affected entity does not manage inverse associations nor uses "emulated" optimistic locking (i.e. it either does not use optimistic locking at all or the datastore supports atomic find-and-update/find-and-delete semantics).
This optimization has no down-side, as we'll still do the re-read in the other cases.
|