Ensures that before adding an item to a collection with identity management the next identity value will be unique within the collection.
Fixes #3581
The actual problem isn't the graph merger but the identity values assigned beforehand. In the reported case the fetch+add didn't generate unique identity values within one collection.
My main concern with this fix would be a performance impact because now each insert has to verify it gets an unique identity value. But I couldn't come up with another solution because I can't know if an insert is harmless or not :-/
Ensures that before adding an item to a collection with identity management the next identity value will be unique within the collection.
Fixes #3581 The actual problem isn't the graph merger but the identity values assigned beforehand. In the reported case the fetch+add didn't generate unique identity values within one collection.
My main concern with this fix would be a performance impact because now each insert has to verify it gets an unique identity value. But I couldn't come up with another solution because I can't know if an insert is harmless or not :-/