• 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

moving from JPA standard annotations to pure hibernate annotations

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,

We have a project wherein we use Hibernate as our ORM layer. We started using Annotations and got to know the Annotations we used were all JPA standard annotations. We want to change this to use pure Hibernate based Annotations.

Is this task just a change of fully qualified package names from javax.*.* to org.hibernate.*.*

Let me know your thoughts on the same.

Thanks,
 
author & internet detective
Posts: 41904
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mohit,
No. Hibernate Core and JPA use different method names to call the queries in the first place.

For example, em.createQuery vs session.createQuery
 
Mohit Sinha
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jeanne.
I am ok with respect to the DAO layer. My issue is with Hibernate POJO annotations. Annotations are the only piece using JPA and we are having core Hibernate ops for the rest.

-M
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mohit Sinha wrote:All,

We have a project wherein we use Hibernate as our ORM layer. We started using Annotations and got to know the Annotations we used were all JPA standard annotations. We want to change this to use pure Hibernate based Annotations.


Any reason why you want to do that? The JPA annotations are supported by Hibernate (and any other JPA implementations). So what's the need for changing those to Hibernate specific annotations (which no other ORM framework will understand).

 
Mohit Sinha
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes a bit weird. But we need to change it as client needs it that way
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the client pays for your company's expertise, advise them that they're probably doing the wrong thing.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic