Announcement Announcement Module
Collapse
No announcement yet.
Differences between Hibernate and JPA Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Differences between Hibernate and JPA

    Hello,

    how can you tell whether Spring code has been written for JPA or Hibernate?

    A colleague of mine has written model code with @entity keywords, yet he says the code uses Hibernate to access the database.

    Many thanks.

    Philroc

  • #2
    JPA is an API developed under JSR 317, Hibernate is an implementation of that API. With hibernate you can get access to the native hibernate layer. There is other implementations of JPA i.e Toplink (Oracle) and OpenJPA (Apache).

    As @Entity is a JPA annotation (javax.persistence.Entity) it has been written to the JPA API. To find out which implementation of JPA it is I would look at the JAR dependencies and see if it is hibernate, OpenJPA etc.

    Comment

    Working...
    X