OnDelete Attribute

So what happens if you delete a constituent from the database? What happens to the child records within the Widget table? Infinity allows you to define what occurs in the USR_WIDGET table when the referenced row (constituent row, in our example) is deleted in the CONSTITUENT table. There are three options:

  • RaiseError – Indicates that an error is raised if an attempt is made to delete the referenced row in the foreign table.

  • CascadeDelete – Indicates that a row from the table is deleted if the referenced row in the foreign table is deleted.

  • SetToNull – Indicates that the field is set to NULL if the referenced row in the foreign table is deleted.