-->
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: object references unsaved transient instance, context?
PostPosted: Thu May 06, 2010 2:06 am 
Newbie

Joined: Wed May 20, 2009 11:20 pm
Posts: 2
I've got an exception saying:
org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: {CLASS NAME HERE}

I can see it's telling me that _something_ holds a reference to {CLASS NAME HERE} and that instance needs to be saved, but because the session doesn't flush until quite a while after the work has been done I am having a bit of trouble locating the specific relationship that's not properly handled.

Does anyone have any experience debugging this type of issue? Is there some extra logging I can turn on, some tools I could use, or any helpful way of getting more context, like maybe the object being saved that has the reference to the transient instance?
Maybe some ID's?

I tend to find the standard debugger gives me a fairly low signal to noise ratio when climbing through the hibernate proxies and framework at the time of the error.

Oh yeah, probably worth mentioning, that while we use cascades in some places, covering everything with cascade="ALL" is a pretty undesirable option at this stage, finding out where the gap is would be much better


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.