Specify class dependency
Use this screen to define how the deleting of associated objects should
be handled. The descriptions below use the insurance example defined earlier.
The options on this window are enabled and disabled depending on the association
you select in the previous screen. For information on the association
property dependencies and delete actions discussed below, refer to About
association properties.
- Independent (no relationship exists between these classes)
- This association places no restrictions on deleting objects belonging
to either class. This option is enabled for all association types. Selecting
this option sets the Dependency to "Independent" and the Delete
Action property for the two associated classes to "None."
- Delete cascade (first class is dependent on second class)
- Class "Claims" is dependent on "Policies".
If class "Policies" objects are deleted, all referenced class
"Claims" objects are deleted.
If you delete a Claim, all referenced Policies will also be deleted.
This option is enabled for Many to One associations.
Selecting this option sets the Dependency to "Delete Action Cascade"
and sets the Delete Action property for the two classes as follows:
- the primary class, Policies, is set to Delete Action Cascade
- the dependent class, Claims, is set to None
- Delete cascade (second class is dependent on first class)
- Class "Policies" is dependent on "Claims".
If class "Claims" objects are deleted, all referenced class
"Policies" objects are deleted.
If you delete a Policy, all referenced Claims will also be deleted.
This option is enabled for One to Many associations.
Selecting this option sets the Dependency to "Delete Action Cascade"
and sets the Delete Action property for the two classes as follows:
- the dependent class, Policies, is set to None
- the primary class, Claims, is set to Delete Action Cascade
- Delete prevent (first class prevents deletion of second class)
- Class "Policies" objects cannot be deleted unless
all referenced "Claims" objects first have been deleted.
You cannot delete an Associated Claim until you have first deleted all
referenced Associated Policies. This option is enabled for Many to One
associations. Selecting this option sets the Dependency
to "Delete Action Prevent" and sets the Delete Action property
for the two classes as follows:
- the primary class, Policies, is set to Delete Action Prevent
- the dependent class, Claims, is set to None
- Delete prevent (second class prevents deletion of first class)
- Class "Claims" objects cannot be deleted unless
all referenced "Policies" objects first have been deleted.
You cannot deleted an Associated Policy until you have first deleted
all referenced Associated Claims. This option is enabled for One to Many associations. Selecting this option sets the Dependency
to "Delete Action Prevent" and sets the Delete Action property
for the two classes as follows:
- the dependent class, Policies, is set to None
- the primary class, Claims, is set to Delete Action Prevent