Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate v. JPA?

 
Siegfried Heintze
Ranch Hand
Posts: 408
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was google searching for a discussion of JPA v. Hibernate and got acres of matches but no good discussions comparing the two.

I see that for my trival example consisting of a single table, JPA reserves an entire column just to store a string containing the type name. I suppose that could be very useful for implementing inheritance. JPA also creates a second table called sequence which I don't understand.

So how might one choose between spring-hibernate and spring-jpa? Are there other options besides these and spring-IBatis?

Thanks,
Siegfried
 
Eric Nielsen
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In some ways its a odd question...

Hibernate is now a provider/implementor of JPA. Yes there are a few features you can use in native hibernate code tat aren't exposed by the JPA standard, but there's only a few.

I'm currently coding to the JPA interfaces, though I have some private convenience methods that map back to a few of the more powerful hibernate-only interfaces to build more useful tools out of. This keeps my non-portable code very contained, while keeping all external dependencies JPA friendly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic