This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate annotations and JPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate annotations and JPA" Watch "Hibernate annotations and JPA" New topic
Author

Hibernate annotations and JPA

rani vini
Greenhorn

Joined: May 13, 2009
Posts: 24
What is hibernate annotations and what is JPA.
I am thinking hibernate annotations are nothing but implementation of JPA. Is that correct?
Can any one explain this in detail?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

ran vi wrote:What is hibernate annotations and what is JPA.
I am thinking hibernate annotations are nothing but implementation of JPA. Is that correct?
Can any one explain this in detail?


JPA is a specification. In the specification it does talk about the JPA Annotations. Hibernate implements those Annotations and it also includes Hibernate only annotations that the JPA spec doesn't cover. Like delete orphan cascade option. There is no such option in the JPA spec about delete orphans. But you do have a delete orphan cascade option in Hibermate, although that is kind of a bad example because it is an attribute of an Annotation rather than an Annotation itself.

But just know that Hibernate has some annotations that go beyond those from the JPA spec.

Mark
Lalit Bhatt
Ranch Hand

Joined: Dec 27, 2007
Posts: 69
JPA is a specification and Hibernate is an implementation of that specification. There are some vendor specific annotation as happens everywhere when the standards are implemented. you can check the tutorial on implmenting JPA using Hiberenate


Java-JavaEE Hibernate Spring Spring Roo Web Applications
rani vini
Greenhorn

Joined: May 13, 2009
Posts: 24
JPA is just specification/Standard and there is no implementation in that.
Frameworks like hibernate and Topilink will implement those specification (What ever mentioned in JPA).Without those frameworks like hibernate OR toplink we can't use JPA.
Is my understanding correct?
Lalit Bhatt
Ranch Hand

Joined: Dec 27, 2007
Posts: 69
Perfect
rani vini
Greenhorn

Joined: May 13, 2009
Posts: 24
Thanq All
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate annotations and JPA
 
Similar Threads
JPA Annotations in Hibernate 2.0
what exactly meant by JPA?
difference between session and entitymanager
Hibernate--Mapping files or Annotations
difference between jpa Annotations and Hibernate Annotations