File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate core vs Hibernate through JPA api

 
Michael Enudi
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have been quizzing myself through this lately trying to find out which is a better way to use hibernate: Hibernate core vs Hibernate through JPA api.

I have been using JPA api for over four years now and simply define the implementation framework in my Persistence.xml file. The rest of course is left to the implementation as I simply code against interfaces.
I have also attempted to use Hibernate implementation through JPA but have never used Hibernate core (simply because I don't want to learn a new HQL).

My question therefore is that for those with experience with any of both method, what would be the gains and loss of using one as against the other.

Many thanks.
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do like to use Hibernate through JPA api because if you need to move from Hibernate to Toplink you will not need to change the classes code.

Only the persistence.xml and the jar. For performance I do not have any data about that. =/
 
Michael Enudi
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hebert Coelho wrote:I do like to use Hibernate through JPA api because if you need to move from Hibernate to Toplink you will not need to change the classes code.

Only the persistence.xml and the jar. For performance I do not have any data about that. =/


We share the same view and currently that is what I do but I would really like to know what I could have been missing by not building on Hibernate core or using HQL.
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic