Avoid re-read prior to update/deletion if not required

Description

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.

Environment

None

Assignee

Gunnar Morling

Reporter

Gunnar Morling

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Fix versions

Priority

Major
Configure