We're updating the issue view to help you get more done. 

DelayedPostInsertIdentifier needs to implement Comparable

Description

When upgrading Hibernate Search from 4.2.6 to 4.3.0.Beta5 I'm getting the following error from one of our tests:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 java.lang.ClassCastException: org.hibernate.action.internal.DelayedPostInsertIdentifier cannot be cast to java.lang.Comparable at org.hibernate.internal.util.compare.ComparableComparator.compare(ComparableComparator.java:36) at org.hibernate.type.AbstractStandardBasicType.compare(AbstractStandardBasicType.java:220) at org.hibernate.action.internal.CollectionAction.compareTo(CollectionAction.java:172) at org.hibernate.engine.spi.ExecutableList.add(ExecutableList.java:222) at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:246) at org.hibernate.event.internal.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:265) at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:103) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1248) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:412) at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175) at org.hibernate.id.FlushIdGenTest.testPersistBeforeTransaction(FlushIdGenTest.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)

I'm going to include a test case in a fix proposal as pull request.

Environment

None

Status

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

4.3.0.Beta5

Priority

Major