Hi,
in eclipse I have installed "HibernateTools-3.2.0.beta6a.zip" and try to generate a POJO with a call to "Run / Hibernate Code Generation...". In the "Exporters" page i have selected "Domain Code (.java)" only.
The Cow.hbm.xml file:
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="Cow" table="COWS">
<id name="id2" column="EVENT_ID">
<generator class="native"/>
</id>
<property name="date" type="timestamp" column="EVENT_DATE"/>
<property name="title"/>
</class>
</hibernate-mapping>
MyCow.java file:
Code:
import java.util.Date;
public class Cow implements java.io.Serializable {
private Long id2;
private Date date;
private String title;
}
The question is: Why have i to code the java-file? I thougt the tool would generate the java-file from Cow.hbm.xml.
Regards:
Franjo