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
|