Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

moving from JPA standard annotations to pure hibernate annotations

 
Mohit Sinha
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • 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,
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
yes a bit weird. But we need to change it as client needs it that way
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the client pays for your company's expertise, advise them that they're probably doing the wrong thing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic