MarimerLLC / csla

A home for your business logic in any .NET application.
https://cslanet.com
MIT License
1.27k stars 406 forks source link

Ensure unique identity values within identity managed collections #4333

Closed StefanOssendorf closed 4 days ago

StefanOssendorf commented 5 days ago

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 :-/