Insert + delete collection item issue using versioned parent

Description

tran start
session.save(parentWithChildren)
parentWithChildren.RemoveChild()
parentWithChildren.AddChild()
tran commit

The child(ren) that is removed after session.save will still be saved when committing transaction. -> incorrect.
Also, the bug is worse if collection is indexed. Then the data in database will be corrupt (incorrect index) and can't be read.

This only occurs if parent entity is versioned.

I'll create a pull request soon.

Environment

None

Assignee

Unassigned

Reporter

Roger

Labels

None

Components

Affects versions

Priority

Major
Configure