Relation between JPA and Hibernate annotation

后端 未结 3 1677
庸人自扰
庸人自扰 2020-12-15 00:29

I am quite new in Spring world and I am studying how to integrate Hibernate and Spring framework

i have some dount about the relation beetween Hibernate annotation a

3条回答
  •  被撕碎了的回忆
    2020-12-15 00:50

    Like @SJuan76 is saying, JPA (Java Persistence API) is a specification and Hibernate is one implementation. I agree with the others; stick to using plain JPA as much as you can. The JPA specification doesn't change very often, and when it does it is usually backward compatible. This means that your code will be protected from changes in the implementation. You are for example free to upgrade your Hibernate dependencies if your code don't depend on anything from org.hibernate.* but rather javax.persistence.*.

    Btw. JPA is in version 2.2 as of Hibernate 5.3. Read more about JPA here

提交回复
热议问题