Annotating an association end
Tagged values on an
association end
The tagged
values used to annotate association ends are presented in the following table:
|
The ... tagged value |
Role |
SQL |
|
{sqlOptimized} |
Indicates that the source table should be merged with the destination
table (1-1 association). For class associations or 0..1 or 1..1 associations, it indicates that
the class association's attributes are placed in the opposite class, without
generating intermediate tables. |
|
|
{onDeleteCascade} |
Indicates that foreign keys must be destroyed if the primary key is
deleted, and provides the ON DELETE CASCADE option for Oracle and an ON
DELETE trigger for Sybase. |
|
|
{primaryKey} |
Adds the primary key of the destination class to the primary key of
the source class (as for a composition association). |
|
The {sqlOptimized}
tagged value
For an association
with 1-1 multiplicity, this tagged value indicates that the source
table must be merged with the destination table.
For a class
association with 1-1 or 1-* multiplicity, the attributes of the class
association will be placed in the destination class of the association end
annotated {sqlOptimized}, without generating an intermediary table.
The
{onDeleteCascade} tagged value
The
{onDeleteCascade} tagged value is used to maintain repository integrity
constraints on associations. For further
information, please see "Association annotations".
The {primaryKey}
tagged value
The {primaryKey}
tagged value adds the primary key of the destination class
to the primary key of the source class (as for a composition association).