-->
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.  [ 5 posts ] 
Author Message
 Post subject: Accession problems in database
PostPosted: Mon Apr 19, 2004 9:18 am 
Beginner
Beginner

Joined: Thu Jan 22, 2004 6:16 am
Posts: 40
Location: Luxembourg
I try to access the same object in the database twice in the same session. But I get the following exception. Is there any way to avoid this error but still be able to access the object twice ?

[14:44:54] [ERROR] com.test.testing.core.storage.HibernateTransaction -
general exception - a different object with the same identifier value was
already associated with the session: 4028fb06fc026d8100fc026dde0a02d9, of
class:


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 19, 2004 9:24 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
please show your code


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 19, 2004 10:00 am 
Beginner
Beginner

Joined: Thu Jan 22, 2004 6:16 am
Posts: 40
Location: Luxembourg
Huh, the code is VERY large, and probably you would not understand it.
And probably not have the time to understand.

Maybe it helps, if I tell you that I am querying the database twice before using the saveOrUpdate-method in the API, and it is when calling that method I get the errormessage.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 19, 2004 10:05 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
do you have a session.disconnect or close before the second query?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 19, 2004 10:10 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Quote:
Huh, the code is VERY large, and probably you would not understand it.


Do not ever post here until you have simplified your code and isolated the problem.

Come back when you have an ultra-simple test case.


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

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.