EntityUpdateAction increments version despite veto on update

Description

The EntityUpdateAction requests whether the update is vetoed by calling preUpdate(). Even if the returned value is true (the update shall NOT be executed), the nextVersion is set to the actual entity. Only executing the update itself is skipped, which inevitably leads to an OptimisticLockingException when the entity is flushed.

The corresponding code is

where nextVersion is the value that the @Version annotated property previously had plus one. Either the nextVersion should be the same as the previous value or the entry.postUpdate(...) must not be executed if veto is true.

Activity

Show:

Nathan XuJanuary 21, 2021 at 8:49 PM

PR created at:

Fixed

Details

Assignee

Reporter

Labels

Fix versions

Priority

Created January 19, 2021 at 2:17 PM
Updated September 20, 2021 at 10:40 PM
Resolved September 17, 2021 at 7:25 AM