File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes moving from JPA standard annotations to pure hibernate annotations Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "moving from JPA standard annotations to pure hibernate annotations" Watch "moving from JPA standard annotations to pure hibernate annotations" New topic
Author

moving from JPA standard annotations to pure hibernate annotations

Mohit Sinha
Ranch Hand

Joined: Nov 29, 2004
Posts: 122
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 23635

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


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Certs: SCEA Part 1, Part 2 & 3 & Core Spring 3, OCAJP
Mohit Sinha
Ranch Hand

Joined: Nov 29, 2004
Posts: 122
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
Saloon Keeper

Joined: Jul 20, 2005
Posts: 6720

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).


[My Blog] [JavaRanch Journal]
Mohit Sinha
Ranch Hand

Joined: Nov 29, 2004
Posts: 122
yes a bit weird. But we need to change it as client needs it that way
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32768
If the client pays for your company's expertise, advise them that they're probably doing the wrong thing.


Android appsImageJ pluginsJava web charts
 
IntelliJ Java IDE
 
subject: moving from JPA standard annotations to pure hibernate annotations
 
Threads others viewed
Pro JPA 2 - JPA for Hibernate users?
JPA - Hibernate Integration
JBoss vs Others
EJB3 and JPA
confused with JAP,Hibernate
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture