Depending on how you define reference constraints in your database schema, you may need to control whether a cascade deletion occurs before or after the referring item is deleted. You can specify the cascade deletion behavior you want to apply in an item descriptor using the cascadeDeleteOrder
attribute in an attribute tag, as in this partial example:
<item-descriptor name="biographies" ...>
<attribute name="cascadeDeleteOrder" value="last">
<table name="...>
<property name="publisher" item-type="publisher" cascade="delete"/>
<property name="...>
</item-descriptor>
You can use one of the following three values in the cascadeDeleteOrder
attribute tag:
Value | Description |
---|---|
| Cascade deletion is performed before any deletes on the tables of this item. |
| Cascade deletion is performed after deleting auxiliary multi-table rows, but before deleting the primary table row. This is the default behavior. |
| Cascade deletion is performed after all deletes on the tables of this item. |