Hi All,
I have the following situation:
Imagine I want to create a product-hierarchy, so I would have a class
Product which has a Link to another object of class Product. The
corresponding database-table also has a foreign key linking to a primary
key of the same table. The mapping file just looks like any
1:n-relationship except that it links to the same class the mapping is
provided for:
<class name="com.foo.Product" identity="id"
key-generator="product">
<cache-type type="none"/>
<map-to table="PRODUCT"/>
<field name="name" type="java.lang.String">
<sql name="NAME" type="varchar"/>
</field>
<field name="id" type="long">
<sql name="ID" type="integer"/>
</field>
>>
<field name="superiorProduct"
type="com.foo.Product">
<sql name="PRODUCT_ID" />
</field>
>>
</class>
</mapping>
My problem now is, that castor does not complain at all, but the
database column for the superiorProduct is not inserted nor updated.
Can anyone help?
Thanks in advance.
Enrico
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev