Enums with class names starting with Capitals cause failure in 5.2.14 (worked previously)

Description

See the testcase attached .

This query will fail on 5.2.12 and 5.2.14 when it was fine on 5.0.12 (this was found during upgrade to Spring boot 2 from 1.5.7).
Change the POM to see both tests working on 5.0.12.
I made some trials andthe problem first appears in 5.2.6

I think this was a result of fixing and introduced in commit 0bd7b8eac16e6966dea81b8a5991e052192a6af2

I marked it minor because there is an easy workaround (rename the Enum to not start with caps). I wanted to report it anyway just in case other people hit it and it takes quite a bit of investigation to isolate the problem. I guess it could have other ramifications as well.

p.s. thanks for the great product!

StackTrace

Environment

OSX (but probably not relevant)

Activity

Show:
Mark Jeffrey
April 1, 2018, 10:48 AM

Please Close this issue it is intended behaviour.

The explanation is here:
https://vladmihalcea.com/the-performance-penalty-of-class-forname-when-parsing-jpql-and-criteria-queries/

If you’re using non-conventional Java constants, then you’ll have to set the hibernate.query.conventional_java_constants configuration property to false. This way, Hibernate will fall back to the previous behavior, treating any expression as a possible candidate for a Java constant.

Assignee

Unassigned

Reporter

Mark Jeffrey

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.0.12

Components

Affects versions

Priority

Minor
Configure