<html lang="en-us"> | |
<head> | |
<title>Creating a Self Association</title> | |
</head> | |
<body class="" id="loio7720bd44f939467ab34694fab1d259d2"> | |
<div id="wrapper"><div id="container"> | |
<h1 class="title topictitle1">Creating a Self Association</h1> | |
<div class="body taskbody"><p class="shortdesc">This section will guide you to create self associations in the entities.</p> | |
<div class="section context" id="loio7720bd44f939467ab34694fab1d259d2__context_N10015_N10012_N10001"><div class="tasklabel"><h2 class="sectiontitle tasklabel">Context</h2></div> | |
<p class="p">To create a self single/bidirectional association proceed as follows: </p> | |
</div><div class="tasklabel"><h2 class="sectiontitle tasklabel">Procedure</h2></div><ol class="ol steps" id="loio7720bd44f939467ab34694fab1d259d2__steps_ppq_mhw_sp"><li class="li step stepexpand" id="loio7720bd44f939467ab34694fab1d259d2__step_N10021_N1001E_N10012_N10001"><span class="ph cmd">Create an entity type as mentioned in the <a class="xref" href="Creating an Entity Type.html" title="This section guides you to create an Entity Type">Creating an Entity Type</a> section. </span></li> | |
<li class="li step stepexpand" id="loio7720bd44f939467ab34694fab1d259d2__step_N1002E_N1001E_N10012_N10001"><span class="ph cmd">Select <span class="ph pname">Single</span> | |
<img class="image" src="Single.png" alt="" style="width:30px;height:25px"/> to | |
create a single self association and select <span class="ph pname">Bidirectional</span><img class="image" src="BDA1.png" alt="" style="width:80px;height:30px"/> to | |
create a bidirectional self association. </span> | |
<p> </p> | |
<div class="note note" id="loio7720bd44f939467ab34694fab1d259d2__note_N1004C_N10049_N1002D_N1001E_N10012_N10001"><span class="notetitle">Note</span> An example for single | |
self association is the association between a Manager and his direct | |
reports. An example for birectional self association is the association | |
between the Employees and Manager as well as Employees and | |
DirectReports.</div> | |
</li> | |
<li class="li step stepexpand" id="loio7720bd44f939467ab34694fab1d259d2__step_N10055_N1001E_N10012_N10001"><span class="ph cmd">Double click (click in the entity type shape and drag the mouse inside the | |
entity type. Then click again inside the entity type shape) in the entity type | |
shape to create a single/bidrectional self association.</span><div class="itemgroup stepresult">The self association is created and a dotted arrow line appears.<p class="p"><img src="CSA1.png" alt="" style="width:404px;height:228px""/></p> | |
</div></li> | |
<li class="li step stepexpand" id="loio7720bd44f939467ab34694fab1d259d2__step_N1006A_N1001E_N10012_N10001"><span class="ph cmd">Choose the <span class="ph pname">Select </span> | |
<img src="BDA2.png" alt="" style="width:40px;height:20px""/> | |
Icon in the Palette to come out of the association create mode.</span><ul class="ul choices" id="loio7720bd44f939467ab34694fab1d259d2__choices_jtm_52c_yj"><li class="li choice">Press escape from the keyboard to come out of the association create mode. <p class="p"><img class="image" src="CSA2.png" alt="" style="width:350px;height:300px""/></p> | |
</li> | |
</ul> | |
<div class="note note" id="loio7720bd44f939467ab34694fab1d259d2__note_N1008D_N1008A_N10067_N1001E_N10012_N10001"><span class="notetitle">Note</span> A Navigation Property | |
is automatically created for the new association. You can rename the | |
navigation property by double clicking on it. Every navigation propery | |
should have a unique name. </div> | |
</li> | |
<li class="li step stepexpand" id="loio7720bd44f939467ab34694fab1d259d2__step_N10098_N1001E_N10012_N10001"><span class="ph cmd">Select the association in the graphical editor. </span><div class="itemgroup stepresult">The properties of the association are displayed in the Properties view. <p class="p"><img src="CSA3.png" alt="" style="width:500px;height:600px"/></p> | |
</div></li> | |
<li class="li step stepexpand" id="loio7720bd44f939467ab34694fab1d259d2__step_N100AD_N1001E_N10012_N10001"><span class="ph cmd">Click in the <span class="ph pname">Value</span> column for the Multiplicity to edit the | |
multiplicity.</span></li> | |
<li class="li step stepexpand" id="loio7720bd44f939467ab34694fab1d259d2__step_N100BA_N1001E_N10012_N10001"><span class="ph cmd">Select a multiplicity and the OData Model Element displays the changes.</span> | |
<p class="p">The value for the Role of the association can also be edited in the | |
Properties view.</p> | |
</li> | |
</ol> | |
</div> | |
</div></div> | |
</body> | |
</html> |