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!
OSX (but probably not relevant)
Please Close this issue it is intended behaviour.
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.