What's the difference between Hibernate and JPA?

前端 未结 3 1997
南笙
南笙 2021-02-12 20:18

Can someone put in perspective the difference between JPA and Hibernate. Or are these complementary concepts, to be used together?

3条回答
  •  离开以前
    2021-02-12 21:15

    Roughly, JPA is a standard from the java community, here the specs, which has been implemented (and extended) by the Hibernate guys (some info here). Being a spec, you will not be using JPA directly, but a JPA implementation.

    Beware that if you'll use the hibernate JPAs' extensions, you'll break the compatibility with other JPA implementations (though some will say "why you should use another JPA implementation?").

提交回复
热议问题