Alexander Schwartz (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6267ec4...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNTc4NTY3MmY4...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16368?atlOrigin=eyJpIjoiNTc4NT...
) HHH-16368 (
https://hibernate.atlassian.net/browse/HHH-16368?atlOrigin=eyJpIjoiNTc4NT...
) UnsupportedOperationException: compare() not implemented for EntityType (
https://hibernate.atlassian.net/browse/HHH-16368?atlOrigin=eyJpIjoiNTc4NT...
)
Change By: Alexander Schwartz (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6267ec4...
)
An example from migrating from H5 to H6 for Keycloak. This happens with Hibernate 6.2.CR4,
and used to work with Hibernate 5:
* In Quarkus, the default is hibernate.order_updates is set to true in
FastBootMetadataBuilder
* Given updating two entities with a compsite key / IdClass which references its parent
entity, it tries to compare the EntityKey, which fails in H6, but worked in H5
* On flush, the comparison fails with the exception shown below when Hibernate tries to
sort the updates
There is a reproducer here:
[
https://github.com/ahus1/hibernate-test-case-templates/tree/is-HHH-xxxx-c...]
Discussed on the Zulip chat here:
[
https://hibernate.zulipchat.com/#narrow/stream/132096-hibernate-user|http...]
Keycloak issue:
[
https://github.com/keycloak/keycloak/issues/19321|https://github.com/keyc...]
{noformat}java.lang.UnsupportedOperationException: compare() not implemented for
EntityType
at org.hibernate.type.EntityType.compare(EntityType.java:255)
at org.hibernate.type.ComponentType.compare(ComponentType.java:215)
at org.hibernate.type.Type.compare(Type.java:222)
at org.hibernate.action.internal.EntityAction.compareTo(EntityAction.java:160)
at org.hibernate.action.internal.EntityAction.compareTo(EntityAction.java:28)
at org.hibernate.engine.spi.ExecutableList.add(ExecutableList.java:225)
at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:311)
at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:353)
at
org.hibernate.event.internal.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:252)
at
org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:143)
at
org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:127)
at
org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:221)
at
org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:90)
at
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38)
at
org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:127)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1412)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1398)
at org.hibernate.bugs.ORMUnitTestCase.hhh123Test(ORMUnitTestCase.java:115){noformat}
(
https://hibernate.atlassian.net/browse/HHH-16368#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16368#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100219- sha1:ac3e918 )