For 2.0, we should consider raising the minimum supported version of Hibernate. @olivergierke has expressed an interest in Spring Data JPA 2.0 (Kay release train) requiring Hibernate 5.2.

Comment From: odrotbohm

I brought the question up as current Spring Data JPA still supports Hibernate 3 (due to Spring Frameworks general support of that version). To support Hibernate 3, 4 and 5, we need a lot of reflection due to some expected (between the major versions) and some rather unexpected (e.g. from 5.1 to 5.2) API changes.

Some of that stuff can be removed by moving to Spring Boot's currently supported default version of 5.0. However, due to the aforementioned breaking changes between 5.1 and 5.2 we'd still be left with quite a bit of reflection to adapt. Being able to move to 5.2 for Spring Data JPA would allow us to purge those hacks much more extensively. Still, I'd prioritize aligning with what Boot decides to choose eventually.

One other thing that might play into this: Spring Frameworks 5's native Hibernate support requires 5.2 already, while its JPA support requires JPA 2.1, which in turn means it's still capable of running on Hibernate 4.3 even.

Comment From: jhoeller

Actually, Spring Framework 5.0's native Hibernate support in orm.hibernate5 is still compatible with Hibernate 5.0 and 5.1 as well, swallowing quite a bit of reflection pain. The main reason is Hibernate 5.0's default inclusion in JBoss EAP 7... and a general intent to cover all actively supported Hibernate versions.

That said, indeed, we still support Hibernate 4.3 in HibernateJpaVendorAdapter and intend to keep this up for the time being since it doesn't come at a high cost there (beyond the cost of supporting Hibernate 5.0).

Comment From: shivam6898

can i able to use Hibernate 5.4.25 final in Spring framework 5.2.11.RELEASE please know me ,thanks in advance!