Meaningless Drivel is fun!*
The moose likes Object Relational Mapping and the fly likes Hibernate core vs Hibernate through JPA api Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate core vs Hibernate through JPA api" Watch "Hibernate core vs Hibernate through JPA api" New topic
Author

Hibernate core vs Hibernate through JPA api

Michael Enudi
Greenhorn

Joined: Apr 24, 2011
Posts: 20
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

Joined: Jul 14, 2010
Posts: 754

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. =/


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
Michael Enudi
Greenhorn

Joined: Apr 24, 2011
Posts: 20
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
 
subject: Hibernate core vs Hibernate through JPA api
 
Similar Threads
Toplink witth JPA vs Toplink API
Performance for Hibernate vs JPA(Hibernate) Jboss Help needed
JPA vs Entity Bean
EJB3 vs Hibernate vs Toplink vs OpenJPA
Hibernate vs JPA (ORM techniques) - Dubious concept