wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes annotations ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "annotations ?" Watch "annotations ?" New topic
Author

annotations ?

Mag Wells
Ranch Hand

Joined: Jun 02, 2010
Posts: 38
how to generate POJOs with annotations ? I was able to reverse engineer a db table and get the corresponding POJO using hibernate tools. But how do we generate annotations.
I am using eclipse pluging for hibernate tools.


What I am able to do is -
1. Reverse engineer using hibernate tools. I get POJO and corresponding hbm.xml files.
2. Now again run the hibernate code generation but this time uncheck the reverese engineer box, provide all the generated mapping files and check 'Generate EJB3 annotations'.

Question are EJB3 annotations different from JPA and hibernate annotations ?


Ultimately, my goal is to use spring autowire thing for hibernate.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: annotations ?
 
Similar Threads
Hibernate(newbie) - generating relational database from Object model
Hibernate Named Queries when using POJO Annotation classes
Help java hibernate
ejb3 reverse engineering from hibernate tools
Calling a Stored Procedures for Hibernate