zollen wrote:
<class name="Order" table="ORDERS">
<id name="id" column="ID"/>
<set name="items">
<key column="id"/>
<one-to-many class="Item"/>
</set>
</class>
<class name="Item" table="ITEMS">
<id name="id" column="ID"/>
<property name="info"/>
</class>
Your mapping does not make a lot of sense to me. I would expect something like
Code:
<class name="Order" table="ORDERS">
<id name="id" column="ID"/>
<set name="items">
<key column="ORDERS_FK"/>
<one-to-many class="Item"/>
</set>
</class>
...
This defines that table ITEM contains a foreign key to ORDERS.
Was this a cut & paste error or do you mean it? If the latter, could you please provide your database create statements or more information on what you intend to do.
Erik