relation

XML format for the relation object

The relation element is a child of the schema object.

The table contains children elements of type fromSide and toSide.

A relation and its inverse relation need only be defined once in a schema file.
Because of this, there is not a need for a ManyToOneRelation (MTO) object.

Note that the actual column will be created on the toSide for OneToOne and OneToMany relations.

<relation type="OneToMany">
   <fromSide table="site" name="cust_loc2case" >
      <description><![CDATA[Cases reported from the site ]]></description>
   </fromSide>
   <toSide table="case" name="case_reporter2site" >     
      <description><![CDATA[Reporting customer site ]]></description>
   </toSide>
</relation>

<relation type="ManyToMany">
   <fromSide table="queue" name="queue2user" >
      <description><![CDATA[]]></description>
   </fromSide>
   <toSide table="user" name="user_assigned2queue" >
      <description><![CDATA[]]></description>
   </toSide>
</relation>

<relation type="OneToOne">
   <fromSide table="employee" name="employee2user" order="1"></fromSide>
   <toSide table="user" name="user2employee" order="1"></toSide>
</relation>

Attribute Name

Required

Default

Description

type

Yes

 

Cardinality of the relation. Valid values are:

  • OneToOne
  • OneToMany
  • ManyToMany

A relation and its inverse relation need only be defined once in a schema file. Because of this, there is not a need for a ManyToOneRelation (MTO) object.

isUserDefined

No

true

Indicates if this relation has been created by the customer.

See Also

schema

table

view

exclusiveRelationSet

sqlView

Next

fromSide

relation