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.
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
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?