Description
I have an entity with ordinary properties, a property with optimistic-lock="false" and a set (implicitly with optimistic-lock="true" as it's the default value).
If I just add a child entity to the collection, the version is incremented correctly but if I change a property without optimistic lock at the same time, the version is not incremented.
The version must be incremented if at least one property (including collections) with optimistic-lock="true" is changed.
The reason is that FlushEntityEvent.HasDirtyCollections
is not filled in case there dirty properties but this doesn't take into consideration whether the dirty properties lead to a version increment. Calling DefaultFlushEntityEventListener.HasDirtyCollections
is necessary because of the side effect it has on the Event
.