blob: d082b1a83fd39eb2fe38e8cbe0e620bbfe7a15c2 [file] [log] [blame]
<html lang="en-us">
<head>
<title>Creating a Single Association</title>
</head>
<body class="" id="loio22be92df80da42cf982b9506e31d8ae8">
<div id="wrapper"><div id="container">
<h1 class="title topictitle1">Creating a Single Association</h1>
<div class="body taskbody"><p class="shortdesc"/>
<div class="section context" id="loio22be92df80da42cf982b9506e31d8ae8__context_N10014_N10011_N10001"><div class="tasklabel"><h2 class="sectiontitle tasklabel">Context</h2></div>
<p class="p">To define single association proceed as follows:</p>
</div><div class="tasklabel"><h2 class="sectiontitle tasklabel">Procedure</h2></div><ol class="ol steps" id="loio22be92df80da42cf982b9506e31d8ae8__steps_r1v_2gw_sp"><li class="li step stepexpand" id="loio22be92df80da42cf982b9506e31d8ae8__step_N10020_N1001D_N10011_N10001"><span class="ph cmd">Create entity types as detailed 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="loio22be92df80da42cf982b9506e31d8ae8__step_N1002D_N1001D_N10011_N10001"><span class="ph cmd">Select the <span class="ph pname">Single</span>
<img src="Single.png" alt="" style="width:40px;height:25px"/>
menu under <span class="ph pname">Associations</span>.</span><div class="itemgroup stepresult">Once Single is selected and on moving the mouse pointer into the OData Model Editor,
the mouse pointer changes its shape indicating that the association creation
mode in active. <p class="p"><img src="SA1.png" alt="" style="width:304px;height:270px"/></p>
</div></li>
<li class="li step stepexpand" id="loio22be92df80da42cf982b9506e31d8ae8__step_N1004F_N1001D_N10011_N10001"><span class="ph cmd">Click in the source entity type shape to create an association and drag the
mouse to the destination shape.</span>
<p> </p>
<img src="SA2.png" alt="" style="width:304px;height:228px"/>
<p> </p>
<div class="itemgroup stepresult">Once on the destination entity shape, left click the mouse to complete
the creation of the association. <p class="p">The association is created and a dotted
arrow line connects the shapes. </p>
</div></li>
<li class="li step stepexpand" id="loio22be92df80da42cf982b9506e31d8ae8__step_N10068_N1001D_N10011_N10001"><span class="ph cmd">Choose <img src="BDA2.png" alt="" style="width:40px;height:28px"/> in the
Palette to come out of the association create mode.</span><ul class="ul choices" id="loio22be92df80da42cf982b9506e31d8ae8__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 src="SA3.png" alt="" style="width:304px;height:228px"/></p>
</li>
</ul>
<div class="note note" id="loio22be92df80da42cf982b9506e31d8ae8__note_N1008A_N10087_N10065_N1001D_N10011_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>
<p class="p">The association is created and an arrow with a singe head appears
representing the single association. Also the cardinality is displayed on
both ends of the arrow implying the relationship one-to-many (star sign
represent many). </p>
</li>
<li class="li step stepexpand" id="loio22be92df80da42cf982b9506e31d8ae8__step_N10099_N1001D_N10011_N10001"><span class="ph cmd">On saving the project, the tree region displays the entity types, new
association and the corresponding navigation property.
<p></p>
</span><img src="SA4.png" alt="Mountain View" style="width:604px;height:400px"/><p class="p">
<p> </p>
<img src="SA6.png" alt="" style="width:604px;height:428px"/></p>
<div class="p">
<div class="note note" id="loio22be92df80da42cf982b9506e31d8ae8__note_N100AD_N100A5_N10095_N1001D_N10011_N10001"><span class="notetitle">Note</span> Association Sets,
Referential Constraints and the soruce and target roles are
automatically created on creation of an association.</div>
</div>
</li>
</ol>
</div>
</div></div>
</body>
</html>