• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate annotations and JPA

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 69
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
rani vini
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 69
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perfect
 
rani vini
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanq All
 
reply
    Bookmark Topic Watch Topic
  • New Topic