This one time, at band camp, Vincent Lambert said:
VL>When I remove a category that contains only items, it works fine : it
VL>deletes the category and the contained items.
VL>When I remove a category that contains items and empty category, it
VL>works fine too : it deletes the category and the contained elements.
VL>
VL>But when I try to delete a category that contains category that contains
VL>elements, it does not recurse into the tree structure.
...
VL> <class name="com.eurelis.webtools.catalog.Category"
VL>identity="Id" key-generator="IDENTITY">
VL> <description>Category definition</description>
VL> <map-to table="category"/>
VL> <field name="Id" type="string">
VL> <sql name="id" type="integer"/>
VL> </field>
VL> <field name="IdCategory" type="string">
VL> <sql name="id_category" type="integer"/>
VL> </field>
VL> <field name="Name" type="string" >
VL> <sql name="name" type="varchar"/>
VL> </field>
VL> <field name="Items"
VL>type="com.eurelis.webtools.catalog.Item" collection="vector">
VL> <sql name="id" many-table="item"
VL>many-key="id_category"/>
VL> </field>
VL> <field name="Categories"
VL>type="com.eurelis.webtools.catalog.Category" collection="vector">
VL> <sql name="id" many-table="category"
VL>many-key="id_category"/>
VL> </field>
VL> </class>
Vincent,
Castor does not support self-referencing relationships. You're mapping
a Category object to a Category object. It's mapping an object of type
Category to an object of type Category. This is a self-referencial
relationship.
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev