Hello,
recently I migrated from Spring Boot 1.5.8 to 2.0.0
(and thus from Hibernate 5.0.12.Final to Hibernate 5.2.14.Final).
However, when using “select new” named queries similar to the following one
SELECT new sk.chgolian.simple.ShortInfo(se.id, se.shortDescription) FROM sk.chgolian.simple.SimpleEntity se
I’ve been getting IllegalArgumentException:
org.hibernate.QueryException: ResultTransformer is not allowed for 'select new' queries.
I was able to reproduce this issue in this small project.
Running
mvn test
and then
mvn test -P test-1.5
should demonstrate and reproduce my issue
(with test passing in the first instance and failing in the second one).
I haven’t been able to find any information about ResultTransformer and these queries being deprecated in the newer versions of Hibernate.
Am I doing something wrong?
Thank you for any help!