Kurt Gollhardt (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYzJmODAxMzA3...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16011?atlOrigin=eyJpIjoiYzJmOD...
) HHH-16011 (
https://hibernate.atlassian.net/browse/HHH-16011?atlOrigin=eyJpIjoiYzJmOD...
) HQL Enum literals don't work for inner class enums (
https://hibernate.atlassian.net/browse/HHH-16011?atlOrigin=eyJpIjoiYzJmOD...
)
Issue Type: Bug Affects Versions: 6.1.6 Assignee: Unassigned Components: query-hql
Created: 10/Jan/2023 03:16 AM Priority: Major Reporter: Kurt Gollhardt (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
When an enum literal is used in a conditional expression in an HQL query and the enum is
an inner class, it fails to find the enum class by name and gives a “SemanticException:
Could not interpret path expression”.
Given an enum InnerEnum with a value named FOO , in the class file OuterClass , in package
path.to.package , it tries to do a Class.forName for
“path.to.package.OuterClass.InnerEnum” instead of “path.to.package.OuterClass$InnerEnum”.
It works fine if the enum is a top-level class. It also works if the enum value is passed
as a (named) parameter instead of used inline as a literal.
(
https://hibernate.atlassian.net/browse/HHH-16011#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16011#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#100213- sha1:cca7326 )