Marten Deinum opened SPR-16916 and commented
The HibernateJpaVendorAdapter pre-defines the values for the entityManagerInterface and entityManagerFactoryInterface.
The current values reference deprecated interfaces (on Hibernate 5.2) and the Hibernate team suggests to use SessionFactory and Session instead as those now extend EntityManagerFactory and EntityManager.
Current values
this.entityManagerFactoryInterface = org.hibernate.jpa.HibernateEntityManagerFactory.class;
this.entityManagerInterface = org.hibernate.jpa.HibernateEntityManager.class;
Suggested values
this.entityManagerFactoryInterface = org.hibernate.SessionFactory.class;
this.entityManagerInterface = org.hibernate.Session.class;
Affects: 5.0.6
Comment From: spring-projects-issues
Juergen Hoeller commented
We can only really change this once we require Hibernate ORM 5.2+. Since this is still a while away (not least of it all due to the default use of older Hibernate versions in JBoss EAP), the best we can do for the time being is to keep exposing those deprecated interfaces.
We'll revisit our arrangement for Spring Framework 5.2 next year, maybe raising our Hibernate baseline at that point.
Comment From: jhoeller
This got addressed for 5.3 M2, along with #25533.