Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-16122 (
https://hibernate.atlassian.net/browse/HHH-16122?atlOrigin=eyJpIjoiNzUxNm...
)
Re: Named type [class xxx] did not implement BasicType nor UserType (
https://hibernate.atlassian.net/browse/HHH-16122?atlOrigin=eyJpIjoiNzUxNm...
)
The workaround is to not use a type variable for persistent attribute types. If you think
about the concept of attributes and which type declares them from a JPA model perspective,
the use of type variables is complicating a lot. Let me explain what happens here.
For the *JPA metamodel* in Hibernate 6 there is only one attribute
TaskServiceDocument#taskSubStage which has the type Enum. It doesn’t matter in the JPA
metamodel what you provide as type argument in subtypes. Since TaskServiceDocument
declares the attribute, we have to consider the type that is declared there. In previous
versions of Hibernate the type of that attribute was actually an (arbitrary) one of the
possible type arguments as provided through subtypes of TaskServiceDocument. This is
obviously wrong. If you ask for the type of the TaskServiceDocument#taskSubStage attribute
it must be Enum.
We went to great lengths to ensure support for type variables is relatively decent, but we
obviously have some edge cases that haven’t been covered by the testsuite. You’ll just
have to wait for the fix (
https://github.com/hibernate/hibernate-orm/pull/6087 ) to be
merged and released, or you build your own version in the meantime to continue testing.
(
https://hibernate.atlassian.net/browse/HHH-16122#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16122#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#100214- sha1:c33f0bb )