I am using a Hibernate Mapping document and the Hibernate Tools Ant tasks to generate domain and DAO code. Here is my hbm.xml:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.me.client.hibernate.AuditTypeLookup" table="AuditTypeLookup" schema="PUBLIC">
<id name="type" type="int">
<column name="Type" />
<generator class="assigned" />
</id>
<property name="description" type="string">
<column name="Description" length="127" />
</property>
</class>
</hibernate-mapping>
When I run hbm2java (to generate the domain code) and hbm2dao (to generate the DAO code) I get a file named "Activitytypelookup.java" which contains a class named "ActivityTypeLookup". You will notice that "Activitytypelookup" is not the same as "ActivityTypeLookup". Of course, this mismatch generates a compiler error. The file should be named "ActivityTypeLookup.java". What should I do?