Hello,
i'm using two classes Menu and MenuGroup which are associated by an 1:n association.
In the xml-scriptlet below you can see the mapping.
The auto-retrieve and auto-update works fine but the auto-delete doesn't.
What is the matter of this?
<class-descriptor
class="org.contineo.admin.Menu"
table="menus"
>
<field-descriptor id="1"
name="menuId"
column="menuid"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
/>
<field-descriptor id="2"
name="menuText"
column="menutext"
jdbc-type="VARCHAR"
/>
<field-descriptor id="3"
name="menuParent"
column="menuparent"
jdbc-type="INTEGER"
/>
<collection-descriptor
name="menuGroup"
element-class-ref="org.contineo.admin.MenuGroup"
orderby="menuid"
sort="DESC"
auto-retrieve="true"
auto-update="true"
auto-delete="true"
>
<inverse-foreignkey field-id-ref="1"/>
</collection-descriptor>
</class-descriptor>
<class-descriptor
class="org.contineo.admin.MenuGroup"
table="menugroup"
>
<field-descriptor id="1"
name="menuId"
column="menuid"
jdbc-type="INTEGER"
primarykey="true"
/>
<field-descriptor id="2"
name="groupName"
column="groupname"
jdbc-type="VARCHAR"
primarykey="true"
/>
<field-descriptor id="3"
name="writeEnable"
column="writeenable"
jdbc-type="INTEGER"
/>
<reference-descriptor
name="menu"
class-ref="org.contineo.admin.Menu"
>
<foreignkey field-id-ref="1"/>
</reference-descriptor>
</class-descriptor>
Regards,
Michael Scholz