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. |