Spring 4.3.2 HibernateTemplate#findByNamedQuery isn't compatible with Hibernate 5.0 [SPR-14676] #19240
Comments
Steve Storey commented From the looks of things, it just needs a similar fix to 19e5a34 to be applied to the findByNamedQuery, findByNamedQueryAndNamedParam, and findByNamedQueryAndValueBean methods as well? |
Juergen Hoeller commented Good catch! Fixed in master now, to be backported to 4.3.3 early next week. |
Juergen Hoeller commented It would be great if you could give the latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steve Storey opened SPR-14676 and commented
https://github.com/spring-projects/spring-framework/blob/master/spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateTemplate.java#L958 attempts to be compatible with Hibernate 5.x, but because it's compiled against 5.2, the compiler then requires that the runtime method return a org.hibernate.query.Query instance, and thus when running with standard Spring Boot 1.4 versions, you get:
in the attached reproduction test when run with simply
If however, you override the standard Hibernate version to 5.2.2 then the test succeeds by running
Affects: 4.3.2
Attachments:
Issue Links:
Referenced from: commits 12afc26, d631b4c
The text was updated successfully, but these errors were encountered: