Skip to content

Missing version update on dirty collection with another property having optimistic-lock false #3631

Closed
@csharper2010

Description

@csharper2010

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions