Difference between JPA Entity and Hibernate Entity

后端 未结 3 1389
说谎
说谎 2020-12-02 14:37

When I annotate a class with @Entity and try to resolve the dependencies, I get to choose the package between two different packages, javax.persistence.Entity and org.hibern

3条回答
  •  一生所求
    2020-12-02 15:09

    I'm not sure about the differences but I am sure that if you have the Hibernate jars in your classpath you are using Hibernate JPA. Hibernate provides an implementation of JPA. Even though you are using the javax.persistence package you are using Hibernate JPA.

    The difference could be only in the naming. They might provide the same classes both in the Hibernate package space and the javax package space.

提交回复
热议问题