-->
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: session save/flush and guaranteed success
PostPosted: Tue Jul 13, 2004 2:59 pm 
Newbie

Joined: Tue Jul 13, 2004 2:53 pm
Posts: 1
Location: Wisconsin
I have a situation where extra caution is needed in saving new entities, so I want to make sure the save did in fact occur without errors before continuing.

From my experience the following code will either succeed or throw a HibernateException

Code:
session.save(myNewObject);
session.flush();


Is this in fact true, or is there some other way I need to check for success after a flush() call?

Thanks,
akellor


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