Details
-
Bug
-
Resolution: Done
-
Blocker
-
7.0.0.ER2 (Beta)
-
None
-
Fixed in 5.0.9.Final.
-
Description
Attached test case, InheritedCollectionTestV1.java was working fine in Hibernate ORM 5.0.3 but it started to throw org.hibernate.MappingException from version 5.0.4 (the same in the current master as well). It seems HHH-5948 introduced an incompatibility.
org.hibernate.MappingException: Unknown collection role: org.hibernate.jpa.test.criteria.InheritedCollectionTestV1$Customer.roles at org.hibernate.internal.SessionFactoryImpl.getCollectionPersister(SessionFactoryImpl.java:825) at org.hibernate.jpa.criteria.path.PluralAttributePath.resolvePersister(PluralAttributePath.java:40) at org.hibernate.jpa.criteria.path.PluralAttributePath.<init>(PluralAttributePath.java:35) at org.hibernate.jpa.criteria.path.AbstractPathImpl.get(AbstractPathImpl.java:149) at org.hibernate.jpa.criteria.path.AbstractPathImpl.get(AbstractPathImpl.java:185) at org.hibernate.jpa.test.criteria.InheritedCollectionTestV1.findCustomerByRole(InheritedCollectionTestV1.java:53) at org.hibernate.jpa.test.criteria.InheritedCollectionTestV1.test1(InheritedCollectionTestV1.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) 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) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
While InheritedCollectionTestV2.java, which removes @Entity and adds @MappedSuperclass to a base class, works fine with version 5.0.4 but this doesn't work with version 5.0.3. The stack trace is exactly the same.
org.hibernate.MappingException: Unknown collection role: org.hibernate.jpa.test.criteria.InheritedCollectionTestV2$UserBase.roles at org.hibernate.internal.SessionFactoryImpl.getCollectionPersister(SessionFactoryImpl.java:825) at org.hibernate.jpa.criteria.path.PluralAttributePath.resolvePersister(PluralAttributePath.java:40) at org.hibernate.jpa.criteria.path.PluralAttributePath.<init>(PluralAttributePath.java:35) at org.hibernate.jpa.criteria.path.AbstractPathImpl.get(AbstractPathImpl.java:149) at org.hibernate.jpa.criteria.path.AbstractPathImpl.get(AbstractPathImpl.java:185) at org.hibernate.jpa.test.criteria.InheritedCollectionTestV2.findCustomerByRole(InheritedCollectionTestV2.java:54) at org.hibernate.jpa.test.criteria.InheritedCollectionTestV2.test1(InheritedCollectionTestV2.java:39) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) 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) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
Does the customer need to rewrite their code to fit the new version, or an unexpected incompatibility is introduced?
Attachments
Issue Links
- is blocked by
-
JBEAP-3593 Upgrade to Hibernate ORM 5.0.9.Final once released
- Closed
- is incorporated by
-
JBEAP-3593 Upgrade to Hibernate ORM 5.0.9.Final once released
- Closed
- cloned from
-
HHH-10556 Loading...