Well, i just post my mapping files!
For Item=Artikel it is like that:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class
name="org.soa.preismonitor.hibernate.Artikel"
table="artikel">
<id
name="id"
column="id">
<generator class="native"/>
</id>
<property
name="ItemCode"
column="ItemCode"/>
<property
name="ItemName"
column="ItemName"/>
<property
name="Description"
column="Description"/>
<joined-subclass name="org.soa.preismonitor.hibernate.FremdArtikel"
table="fremdartikel">
<key column="ID"/>
<many-to-one name="RefItem" class="org.soa.preismonitor.hibernate.Artikel" column="refitem"/>
<many-to-one name="CompCode" class="org.soa.preismonitor.hibernate.Mitbewerb" column="compcode"/>
</joined-subclass>
</class>
</hibernate-mapping>
and for the Price=Preis it is like that:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class
name="org.soa.preismonitor.hibernate.Preis"
table="preis">
<id
name="id"
column="id">
<generator class="native"/>
</id>
<many-to-one name="artikel" class="org.soa.preismonitor.hibernate.Artikel" column="refitem"/>
<property
name="Datum"
column="PriceDate"/>
<property
name="Memo"
column="Memo"/>
</class>
</hibernate-mapping>
Where should i use a collection?