-->
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.  [ 2 posts ] 
Author Message
 Post subject: Saving new objects and flush
PostPosted: Fri Oct 30, 2009 9:53 am 
Newbie

Joined: Wed Mar 08, 2006 5:48 pm
Posts: 4
This is hopefully a quick question and I apologize in advance if this has been answered a million times. I swear I searched first.

Is it possible for a new object to be persisted (I assume in the transaction) when flush is called if save (or equivalent) has not yet been called for this object. I assumed that it would not but I having an issue where I'm getting constraint errors on my object before I am ready to save it when I call flush(). I need to call flush because I am making changes to an existing object that get lost if I don't flush (I assume when I do another lookup later on).

I'm open to the idea that I'm causing the issue. I think I just need to check my assumptions.

Thanks in advance.


Top
 Profile  
 
 Post subject: I figured it out
PostPosted: Fri Oct 30, 2009 12:04 pm 
Newbie

Joined: Wed Mar 08, 2006 5:48 pm
Posts: 4
I am associating my new object to an existing object. That's how it is becoming visible to the session.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.