I have a complex query created using JPA criteria API that worked on previous versions (tested on 5.3.7 and 5.2.15). It doesn't work on 5.4.0.
The query contains a select case statement inside the select clause, as this simplified example:
The example works when using HQL:
I've attached a simple test case.
This is a duplicate of HHH-13016.
I'm closing this one. Will move to 5.4.1 to see if we can come up with a fix for 5.4.1.
Reopening as the issue is a bit different and we need to incorporate both test cases and be sure both cases are fixed.