The addRelation element allows a new relation to be added to the schema.
Example:
<addRelation name="employee2state" type="OneToMany" table="employee" inverseRelationName="state2employee" inverseTable="state_prov">
<description>my description for employee2state</description>
<inverseDescription>my description for state2employee</inverseDescription>
</addRelation>
Required Attributes:
Attribute Name |
Description |
---|---|
name |
Specifies the name of the relation |
type |
Cardinality of the relation. Valid values are:
A relation and its inverse relation need only be defined once in a schema script file. Because of this, there is not a need for a ManyToOneRelation (MTO) object. |
table |
Specifies the name of the table on which this relation should be added. |
inverseRelationName |
Specifies the name of the inverse relation. |
inverseTable |
Specifies the name of the table on which the inverse relation should be added. |
Optional Child Elements:
Element Name |
Default |
Description |
---|---|---|
description |
|
Description of the relation. |
inverseDescription |
|
Description of the inverse relation. |
exclusiveRelationSet |
|
The name of the exclusive relation set to which this relation should be part of. |
See Also |
Next |