• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Hibernate core vs Hibernate through JPA api  RSS feed

 
Greenhorn
Posts: 20
  • 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.
 
Ranch Hand
Posts: 754
Eclipse IDE Java
  • 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
  • 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 child proofed my house but they still get in. Distract them with this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!