Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-16916

Use non-deprecated interfaces in HibernateJpaVendorAdapter

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.0.6
    • Fix Version/s: 5.x Backlog
    • Component/s: Data:ORM
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      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;
      

        Attachments

          Activity

            People

            Assignee:
            juergen.hoeller Juergen Hoeller
            Reporter:
            mdeinum Marten Deinum
            Last updater:
            Spring Issuemaster
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              1 year, 25 weeks, 1 day ago