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

Status

Assignee

Gunnar Morling

Reporter

Gunnar Morling

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Fix versions

Priority

Major
Configure