Jakub (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYWIzMDA5NTNk...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16195?atlOrigin=eyJpIjoiYWIzMD...
) HHH-16195 (
https://hibernate.atlassian.net/browse/HHH-16195?atlOrigin=eyJpIjoiYWIzMD...
) Hibernate 6 fails to bind appropriate type for mapped superclass with generic attribute
(
https://hibernate.atlassian.net/browse/HHH-16195?atlOrigin=eyJpIjoiYWIzMD...
)
Issue Type: Bug Affects Versions: 6.2.0.CR2, 6.1.7 Assignee: Unassigned Components:
hibernate-entitymanager Created: 17/Feb/2023 07:04 AM Environment: java 17 Priority: Major
Reporter: Jakub (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
If a base class (mapped superclass) has a generic attribute and there are more than one
subclasses (entities) with different (concrete) attribute types, hibernate 6 will
incorrectly use the first (alphabetically) attribute type as required for all entities.
This in turn causes an exception when trying to query using the generic attribute.
Minimal test case:
https://github.com/kuba-wu/h6-demo (
https://github.com/kuba-wu/h6-demo
)
This used to work in Hibernate < 6.
Issue confirmed with latest stable (6.1.7) and devel (6.2.0.CR2).
(
https://hibernate.atlassian.net/browse/HHH-16195#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16195#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#100216- sha1:3fa9804 )