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: Problem with object loaded more than once from database
PostPosted: Fri May 30, 2008 3:33 am 
Newbie

Joined: Fri Jan 05, 2007 5:36 am
Posts: 16
Hi,

I have some problems with session.Load.
When I try to load an object from the database, in this case User, I get the following error:

a different object with the same identifier value was already associated with the session: 715, of class: Test.Entities.User.

Well, I understand where the problem lies and I have solved it by removing other places that may load the User object again with a session or maybe a temporary variable.

Does anyone know a good way to get around this problem? Is there anyway I can find the object in the session again without accessing the database?



Cheers,
Yagami


Top
 Profile  
 
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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.