-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: can hbm2java generate Hibernate objects with xdoclet tags?
PostPosted: Wed Sep 29, 2004 5:48 pm 
Beginner
Beginner

Joined: Thu Sep 16, 2004 8:14 pm
Posts: 27
I have used Middlegen to create .hbm.xml files for the tables in my existing db schema. Using hbm2java I was able to generate .java files from each .hbm.xml file. I wanted that to be a one time thing where I can take these .java files and fine tune them by hand. I'd like to be able to run the hibernate xdoclet task through these Java files to generate new .hbm.xml files. Is there a way to get hbm2java to write the xdoclet tags into the .java files as they're created?
In summary, I wanted this to be a one time thing:

schema --Middlegen--> .hbm.xml files --hbm2java--> .java files

At this point I would like the generated .java files to contain the xdoclet tags necessary to generate .hbm.xml files.
Now I'd like to hand tune the .java files and from now on build this way:

.java files --xdoclet--> .hbm.xml files

Thank you,
-M@


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 29, 2004 6:18 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
hbm2java does not produce XDoclet tags. Having said that you can ask Middlegen to generate them and pass them on to hbm2java to include in the final generated POJO. Refer to the Middlegen wiki page on the hibernate site.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 29, 2004 6:50 pm 
Beginner
Beginner

Joined: Thu Sep 16, 2004 8:14 pm
Posts: 27
Thanks David, I got it working shortly after I sent my first post. I was using the Middlegen-Hibernate package from

http://prdownloads.sourceforge.net/hibe ... &sort=desc

and in its build.xml there was a section that mentioned added xdoclet tags to the POJO classes that hbm2java generates.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.