You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. This may affect Optimistic Locking.
The corresponding code is
publicoverridevoidExecute(){
...bool veto =PreUpdate();
...if(!veto){persister.Update(id,state,dirtyFields,hasDirtyCollection,previousState,previousVersion,instance,null,session);}
...if(entry.Status==Status.Loaded||persister.IsVersionPropertyGenerated){
...// have the entity entry perform post-update processing, passing it the// update state and the new version (if one).entry.PostUpdate(instance,state,nextVersion);}
...}
where nextVersion is the value of the Version 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.
I am working for PR for it.
The text was updated successfully, but these errors were encountered:
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. This may affect Optimistic Locking.
The corresponding code is
where nextVersion is the value of the Version 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.
I am working for PR for it.
The text was updated successfully, but these errors were encountered: