wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Why does Hibernate use JPA? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Why does Hibernate use JPA?" Watch "Why does Hibernate use JPA?" New topic
Author

Why does Hibernate use JPA?

Swerrgy Smith
Ranch Hand

Joined: Mar 26, 2010
Posts: 88
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

Joined: Jan 10, 2002
Posts: 60782
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Don't get me started about those stupid light bulbs.
 
subject: Why does Hibernate use JPA?
 
Similar Threads
A sense of style: @OneToMany or @ElementCollection?
how to use Xdoclet in standalone application
JPA/Hibernate entity mapping error?
Different Objects from one table?
Hibernate