Class Definition Reference
Specifies the action to take in the current table when a related object is deleted. This keyword applies only to a relationship property that specifies Cardinality
. Its use is invalid in all other contexts.
To specify the action to take in the current table when a related object is deleted, use the following syntax:
Relationship relname As classname [ Cardinality = cardinality, Inverse = inverse, OnDelete = ondelete ];
is one of the following values. In this discussion, related record
is a record or object belonging to the other side of the relationship, and referencing record
is the record or object in this side of the relationship.
When a related record is deleted, the referencing record in this table is also deleted.
When an attempt is made to delete a related record, the attempt fails.
When a related record is deleted, the referencing record in this table is set to its default value.
When a related record is deleted, the referencing record in this table is set to null.
This keyword defines the referential action that occurs when a record is deleted on the other side of a relationship.
If you omit this keyword, then:
Relationship Patient As MyApp.Patient [ Cardinality = parent, Inverse = Diagnoses, OnDelete = cascade ];
Content Date/Time: 2019-02-21 01:13:32