• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why does Hibernate use JPA?

 
Swerrgy Smith
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I would like to know why does Hibernate use JPA while both of them are data persistence frameworks?
Does that mean there is a tight coupling between Hibernate and JPA?
I read that JPA is the interface while Hibernate is the actual implementation, but it seems that the annotations which they provide (@Table, @Column ...) is in an actual library (javax.persistence ...) and not just interface.

For example, when we declare an entity in Hibernate, we use JPA annotation like below:



Thank you very much.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate doesn't use JPA, it is a JPA implementation. So yes, it provides the implementations for the JPA interfaces.

It also has its own proprietary API and set of annotations.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic