Hi I am newbie to Hibernate. I got to upgrade the Hibernate version from 2.1.6 to 3.
While upgrading to HB 3, I had to replace the hbm2java task[net.sf.hibernate.tool.hbm2java.Hbm2JavaTask] with hibernatetool[org.hibernate.tool.ant.HibernateToolTask]
Code:
<taskdef
name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="hibernate.lib"/>
<hibernatetool destdir="${hibernate.build}">
<configuration>
<fileset dir="${hibernate.src}">
<include name="**/*.hbm.xml" />
</fileset>
</configuration>
<hbm2java/> <!-- generate default .java files -->
</hibernatetool>
The earlier tool hbm2java task[net.sf.hibernate.tool.hbm2java.Hbm2JavaTask] generated following three kinds of constructors for my *.hbm.xml files.
1. Full
2. Default
3. Minimal
4. Many other Customer Constructors
The new tool just generates
1. Default
2. Constructor with primary id key
FYI: I am making use of hibernate-tools-3.1.0.alpha5 version.
Please guide how should I generate all those constructors that i used to get generated by Hbm2JavaTask.