Here's my very data structure:
categoryId - int
name - varchar
parentId - int
parentId is a recursive reference to categoryId
Does anyone know how I would set up the class-descriptor for the
collection of children?
Here's what I have:
<class-descriptor
class="business.Category"
table="categories"
>
<field-descriptor id="1"
name="id"
column="categoryId"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
/>
<field-descriptor id="2"
name="name"
column="NAME"
jdbc-type="VARCHAR"
/>
<collection-descriptor
name="subCategories"
element-class-ref="business.Category"
auto-delete="true"
>
<inverse-foreignkey field-ref="parentId"/>
</collection-descriptor>
</class-descriptor>
I'm not entirely sure what the inverse-foreignkey element means.
Thanks for any help
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]