-->
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.  [ 1 post ] 
Author Message
 Post subject: Specifying ClassName
PostPosted: Tue Nov 11, 2003 5:07 pm 
Newbie

Joined: Mon Nov 10, 2003 9:09 pm
Posts: 3
Hi,

I am trying to do all the process automatically. I mean, I already create an ant task wich connect to the database, create de hbm.xml files and create the classes. But, the classes created have the same name that their tables. I mean, a table called Labor create a class called Labor. I want to specify the name of the created class (eg AbstractLabor).

I know that I can do this with <meta attribute="generated-class">, how to create the xml file with this tag??
The first step I am doing using middlegen. Is there any way to specify middlegen that I want to add a meta attribute to the hbm.xml created files??
The second step (xml -> java) I am using the hbm2java. If that is not possible to do in the first step, is there any way to specify to hbm2java the name of the java class to create as a parameter??

I need this process, because I want to create concrete classes wich extends that generated classes and then work with them, in that way if I need to add a new method I can write it in the concrete class; and if there is any modification in the database I can overwrite the abstract class safely.

Thank you!!!


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

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.