Hi all
i've added some meta tags to my hibernate mapping 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">
<!-- Generated 15.05.2006 08:23:47 by Hibernate Tools 3.1.0.beta5 -->
<hibernate-mapping>
<class name="najsre7.model.Benutzer" table="TBENUTZER" schema="NAJSRE7_WEB">
<id name="id" type="java.lang.Integer">
<column name="ILAUFNUMMER" precision="9" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_TBENUTZER</param>
</generator>
</id>
<timestamp name="mutDatum" column="DMUTDAT" />
<many-to-one name="benutzerStatus" class="najsre7.model.BenutzerStatus" fetch="select">
<column name="FK_TBENUSTAT_ISTATUS" precision="9" scale="0" not-null="true" />
</many-to-one>
<property name="benutzerName" type="java.lang.String">
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<column name="SBENUTZERNAME" length="50" not-null="true" />
</property>
<property name="passwort" type="java.lang.String">
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<column name="SPASSWORT" length="50" not-null="true" />
</property>
<property name="EMail" type="java.lang.String">
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<column name="SEMAIL" length="50" not-null="true" />
</property>
<property name="lastLogin" type="timestamp">
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<column name="DLASTLOGIN" length="11" />
</property>
<property name="anzahlLogin" type="java.lang.Integer">
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<column name="IANZLOGIN" precision="9" scale="0" not-null="true" />
</property>
<property name="mutUser" type="java.lang.String">
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<column name="SMUTUSER" length="10" not-null="true" />
</property>
<property name="stvUser" type="java.lang.String">
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<column name="SSTVUSER" length="10" />
</property>
<property name="personId" type="java.lang.Integer">
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<column name="FK_TPER_IPERSNR" precision="9" scale="0" not-null="true" />
</property>
<set name="zugaenge" inverse="true">
<key>
<column name="FK_TBENU_ILAUFNR" precision="22" scale="0" />
</key>
<one-to-many class="najsre7.model.Zugang" />
</set>
<set name="profile" table="TBENU_PROFIL_MATRIX" fetch="join" cascade="all" >
<key column="FK_TBENU_ILAUFNR" />
<many-to-many column="FK_TPROFIL_ILAUFNR" class="najsre7.model.Profil" />
</set>
</class>
</hibernate-mapping>
If i generate my model classes no toString and equals methods will be generated. What am i doing wrong? Here is my ant task:
Code:
<hibernatetool destdir="${dest.dir}">
<jdbcconfiguration
configurationfile="conf/hibernateTools/hibernate.cfg.xml"
revengfile="conf/hibernateTools/hibernate.reveng.xml"
reversestrategy="hibernate.NajsReverseEngineeringStrategy"
/>
<hbm2hbmxml
templatepath="src/najsTemplates"/>
<hbm2java jdk5="false" ejb3="false" />
</hibernatetool>
Regards
Angela