<cad TargetType="CAD" UseHierarchy="1">CADID</cad> Set a reference of an object CAD, which is a XML parent object, to MetaProperty CADID of the current processed object
</Reference>
</source>
'''Attributes'''
{| class="wikitable" | width = "80%"
|-
! width=20% | Attribute!! width=10% |Values!! Description
|-
| TargetType|| Text || Name of class mapping of referenced object
|-
| UseHierarchy|| 0 or 1|| Import: Ignore key attribute of XML element, use parental object instead(default = 0); the system will always create the reference whether or not a XML data element is available<br/>Export: parent object in view will not be exported (default = 0) as reference element
|}
=== Section: <Relation> ===
* Mapping of a XML elements to an MetaProperty representing either, a foreign key or a Guid value, linking to an another {{UBIK}} object
* The system tries to load the content object of the MetaClass as defined in the class mapping identified by '''TargetType''' with key values similar to the values of the according XML attribute in the data file. If an object can be found, a reference to this object is set on the MetaProperty named similar to the inner text of the XML element in the mapping file.
* For an import process set '''UseHierarchy=1''' to load a content object corresponding to any parental XML element of the one currently processed.
<source lang="xml">
<Relation>
<sap TargetType=”SAPobj” Name=”SAP_REL”>
<Property> Relation data properties
<rd1>RelData1</rd1>
<rd2>RelData2</rd2>
</Property>
</sap>
<cad TargetType=”CADobj” Name=”CAD_REL”>
<Property>
<rd1>RelData1</rd1>
<rd2>RelData2</rd2>
</Property>
</cad>
</Relation>
</source>