Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use non-deprecated interfaces in HibernateJpaVendorAdapter [SPR-16916] #21455

spring-projects-issues opened this issue Jun 7, 2018 · 2 comments
in: data type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Jun 7, 2018

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

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jun 7, 2018

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.

@spring-projects-issues spring-projects-issues added in: data type: enhancement labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.x Backlog milestone Jan 11, 2019
@jhoeller jhoeller self-assigned this Aug 24, 2020
@jhoeller jhoeller removed this from the 5.x Backlog milestone Aug 24, 2020
@jhoeller jhoeller added this to the 5.3 M2 milestone Aug 24, 2020
Copy link

@jhoeller jhoeller commented Aug 24, 2020

This got addressed for 5.3 M2, along with #25533.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: data type: enhancement
None yet

No branches or pull requests

2 participants