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!!!
|