Below is my hibernate mapping file i want to generate toString and equals method using hibernate tool ant task.
<class name="org.hibernate.db.Country" table="country" catalog="world">
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<id name="code" type="string">
<column name="Code" length="3" />
<generator class="assigned" />
</id>
</class>
but i am not able to generate toString or equals method is there any thing wrong in this mapping file.
i have checked hibernate-mapping-3.0.dtd and hibernate-reverse-engineering-3.0.dtd files both are up to date.
Best Regards,
Vivek S. Shah
It could be because you missed name="country" property at class level.
I have verified in hibernate 4,by adding meta data in the hiernate mapping file,equals and hashcode methods are creating as expected.
You can also define these meta data at property level.