Hi,
I'm having a problem with NHibernate 0.9. When trying to save a particular persistent type i'm getting the "object already exists with id ..." exception occuring. The model is something like this:
Code:
[User]-------[Client]
| |
| |
|--[Regions]--|
It is a Region that the session is complaining about. I'm trying to save an instance of User which then cascades to Client which cascades to Regions.
So the Region is loaded into the session (out of my control) and then the same Region is attempting to save through its relationship with User.
I can't use lazy-loading in this domain model for reasons I won't go into :roll:
However, if I turn lazy loading on for Client.Regions everything is fine (as to be expected). Is there anyway round this problem? Thanks.