| There is problem, when parent entity has generated value IDENTITY and batch update is enabled. This happens only (if all conditions are met):
- parent has generated value IDENTITY (changing this to SEQUENCE fixes problem)
- if parent entity has child list initialized on class instantialization
and one parent is read from database, and the other is created in session and flushed than two child entities are created for each, and linked and flushed .
- persisence factory property 'hibernate.order_updates' is set to true
LOG OF EXCEPTION Error output of class: java.lang.ClassCastException:449895102 org.hibernate.action.internal.DelayedPostInsertIdentifier cannot be cast to java.lang.Long Stack: java.lang.Long.compareTo(Long.java:54) org.hibernate.internal.util.compare.ComparableComparator.compare(ComparableComparator.java:23) org.hibernate.internal.util.compare.ComparableComparator.compare(ComparableComparator.java:18) org.hibernate.type.AbstractStandardBasicType.compare(AbstractStandardBasicType.java:215) org.hibernate.action.internal.CollectionAction.compareTo(CollectionAction.java:159) org.hibernate.engine.spi.ExecutableList.add(ExecutableList.java:227) org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:307) org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:371) org.hibernate.event.internal.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:301) org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:95) org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38) org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1454) org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1440) created data model for DB2 and testCase ORM5 are included in: [^DB2_MODEL.txt] [^TestVersion_ORM5_Without_db2_project related data.zip] |