Hi everyone!
I've been able to use the hbm2java ant task bundled in the hibernate tools 3.0 alpha. I was able to successfully run the ant task...however I encountered a small, annoying problem. The <id> tags are not generated in the POJO.
here is one of my mapping files. I've removed the other properties for brevity:
Code:
<hibernate-mapping package="com.ssi.hibernate.playground">
<class name="PersonalInfo" table="personalinfo">
<id name="id" type="string" length="32">
<generator class="uuid.hex">
<!--
<param name="property">employee</param>
-->
</generator>
</id>
<property name="firstname" type="string" length="30" />
<property name="middlename" type="string" length="30" />
<property name="lastname" type="string" length="30" />
<property name="birthdate" type="date" />
<property name="gender" type="char" />
</class>
</hibernate-mapping>
Currently, everytime I generate a POJO, I have to manually add the id. It's time consuming especially if you have a lot of mapping files at hand.
How do you go about this?