-->
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: Order of Insert Objects
PostPosted: Tue Jul 14, 2009 8:49 am 
Newbie

Joined: Thu Apr 16, 2009 7:09 am
Posts: 13
Hi,

I have a strange problem with Hibernate.

The first time around that I create some new objects and append it to an existing child relationship, all is well, and all is saved to the DB without any problems.

I then create another new set of objects, which go through the exact same piece of code, and it attempts to write the objects in a different order, which is invalid, because one of the first objects it tries to write has a dependency on another object which needs to be written, and then it throws a
'not-null property references a null or transient value' exception

I seem to have found where the list is coming from:
IdentityMap.concurrentEntries( session.getPersistenceContext().getEntityEntries() )
called in the method:
org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes

Why would the order of this list change? and is there any way to ensure the order of the processing of these objects??

Thanks in advance for any thoughts on this! or if you need any further details.

Hibernate Core: 3.3.1.GA
Hibernate Annotations: 3.4.0.GA
Hibernate Validator: 3.1.0.GA


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.