-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: object already exists with id: ...
PostPosted: Thu Sep 01, 2005 6:53 am 
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.


Top
  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.