The support for using an alias in the group by was added in 5.4.4 I think, but it will only work with JPQL/HQL, not through the Criteria API. Anyway, the issue you are having is that the JPA Criteria Literal is rendered as parameter. This can be turned off by setting hibernate.criteria.literal_handling_mode to INLINE which IMO should be the default. |