I'm using the last version of Hibernate version 3.0.3 and Hibernate-tool 3.0 alpha 1. I'm using this ant task for code generation:
Code:
<target name="gen-classes" description="Creates the code based on the Hibernate mapping docs.">
<pathconvert refid="hibernate.mapping.files"
property="hibernate.mappings" pathsep=" "/>
<java classname="org.hibernate.tool.hbm2java.CodeGenerator" fork="true">
<classpath refid="project.class.path" />
<arg line="--output=${build.src}"/>
<arg line="${hibernate.mappings}"/>
</java>
</target>
This is my mapping file:
Code:
<hibernate-mapping>
<class name="it.dp.magazzino.hibernate.Profilo" table="profilo">
<meta attribute="generated-class" inherit="false">it.dp.magazzino.hibernate.AbstractProfilo</meta>
<meta attribute="scope-class">public abstract</meta>
<id name="id" type="long" unsaved-value="null">
<generator class="increment" />
</id>
<property name="descrizione" type="java.lang.String" column="descrizione" not-null="true" length="255" />
<set name="utenti" lazy="true" inverse="true" cascade="none">
<key>
<column name="id_profilo" />
</key>
<one-to-many class="it.dp.magazzino.hibernate.Utente" />
</set>
</class>
</hibernate-mapping>
No ID's getter and setter method has been generated.
Where is the problem?
Thank.
Gianni