Depending on how you define reference constraints in your database schema, you might 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 with 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

first

Cascade deletion is performed before any deletes on the tables of this item.

afterAuxiliaryBeforePrimary

Cascade deletion is performed after deleting auxiliary multi-table rows, but before deleting the primary table row. This is the default behavior.

last

Cascade deletion is performed after all deletes on the tables of this item.

 
loading table of contents...