ComponentOne DataObjects for .NET
Simple Relation Properties
DataObjects for .NET (Enterprise Edition) > Schema Objects > Simple Relations > Simple Relation Properties

The following properties can be used when creating a simple relation between two simple tables:

Property Description
EnforceConstraints If this property is set to True (default), then this relation will not allow child records without parent. For example, the Customers – Orders relation will not allow the user to set Orders.CustomersID to a value that does not exist in the Customers table.
DeleteCascadeRule This property specifies what happens to child rows when their parent row is deleted. None means that child rows are left unchanged. As a result of deleting the parent row, they become orphan rows, without parent. The Cascade value means that child rows are deleted. Set this property to Cascade when child rows belong to their parent, should not exist without it. There are also two less frequently used values: SetNull meaning that child rows remain with related field(s) set to null, and SetDefault meaning that child rows remain with related field(s) set to its default value.
UpdateCascadeRule This property determines what happens to child fields when parent field values are changed. If it is set to Cascade (default), the child fields are changed correspondingly. If it is set to None, the child fields are left unchanged. If it is set to SetNull, the child fields are set to null. If it is set to SetDefault, the child fields are set to their default values.
UpdateCascadeServer Cascade update, equivalent to what happens if UpdateCascadeRule is set to Cascade, can also be performed by the database itself. If this is the case, DataObjects for .NET must know that and adjust the process of updating the database. If this is not done, cascade update occurring in the database will conflict with cascade update already performed by DataObjects for .NET (if UpdateCascadeRule=Cascade). To prevent this conflict, if your database performs cascade updates for this relation, set the UpdateCascadeServer property to True. Note that there is no corresponding property for cascade delete, although cascade delete can also be performed by the database. If both a simple relation and the database perform cascade delete, make sure the IgnoreDeleteError property is set to True (default value). That will prevent conflicts between cascade deletes in DataObjects for .NET and in the database. The only possible conflict is that DataObjects for .NET tries to delete database records in the child table already deleted by the database as a result of deleting their parent record. If IgnoreDeleteError is set to True, this error (trying to delete already deleted record) will be ignored.