Quick search:

How to configure cascaded delete and delete protection

Cascaded delete and delete protection are configured by setting onDelete of the multi value property descriptor of the property with the dependent objects.

onDelete defines what should happen to values of this property if the owning peanut is deleted:

  • If not set, nothing happens.
  • If set to 'd' the property values will be deleted too, so the delete will cascade to the property values.
  • If set to 'c' the property will be checked to be empty, in other words the owning peanut can only be deleted if the property has no values.
  • If set to 'v' the user will be asked to verify the deletion of the property values. For this the abstract user interface will pop up a VerifyDeleteDialog with all values of all properties recusively with onDelete = 'v'. (since version 2.0)

Apart from these configurations application developers are free to override ::getDeleteErrorMessages to extend or replace the delete checking performed for properties with onDelete = 'c'.