-->
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.  [ 3 posts ] 
Author Message
 Post subject: refresh(Object) => Exception: Instance does not exist
PostPosted: Fri Dec 19, 2003 3:53 pm 
Newbie

Joined: Sat Dec 13, 2003 7:52 pm
Posts: 2
Location: Bergneustadt (Germany)
Hi

I have a problem with session.refresh:

if i call the refresh on an newly inserted object (with saveOrUpdate) inside the transaction, i get an exception:

net.sf.hibernate.HibernateException: this instance does not yet exist as a row in the database


if i call refresh after the commit everything works fine. Is that ok?

I am using hibernate 2.1.1 with postgres 7.4


Lars Tetzlaff


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 19, 2003 3:58 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You probably need to do a flush() between save and refresh


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 19, 2003 4:15 pm 
Newbie

Joined: Sat Dec 13, 2003 7:52 pm
Posts: 2
Location: Bergneustadt (Germany)
Yes, that woks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.