• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate core vs Hibernate through JPA api

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic