blob: 60202062f70bc419ce2041221bee8a7ec4c01e5b [file] [log] [blame]
<html lang="en-us">
<head>
<title>Creating a Bidirectional Association</title>
</head>
<h1 class="title topictitle1">Creating a Bidirectional Association</h1>
<div class="body taskbody"><p class="shortdesc">Instructions about how to create a bidirectional associations.</p>
<div class="section context" id="loioeef0a787772546da8bb64168fba51823__context_N10015_N10012_N10001"><div class="tasklabel"><h2 class="sectiontitle tasklabel">Context</h2></div>
<p class="p">To create a bidirectional association proceed as follows:</p>
</div><div class="tasklabel"><h2 class="sectiontitle tasklabel">Procedure</h2></div><ol class="ol steps" id="loioeef0a787772546da8bb64168fba51823__steps_arg_pgw_sp"><li class="li step stepexpand" id="loioeef0a787772546da8bb64168fba51823__step_N10021_N1001E_N10012_N10001"><span class="ph cmd">Create two entity types 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="loioeef0a787772546da8bb64168fba51823__step_N1002E_N1001E_N10012_N10001"><span class="ph cmd">Select the <span class="ph pname">Bidirectional</span>
object under <strong class="ph b">Associations.</strong>
<p><img src="BDA1.png" alt="Mountain View" style="width:100px;height:28px">
</p>
</span><div class="itemgroup stepresult">Once Bidirectional 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. </div></li>
<li class="li step stepexpand" id="loioeef0a787772546da8bb64168fba51823__step_N10049_N1001E_N10012_N10001"><span class="ph cmd">Click in the source entity type to create a bidirectional association and drag
the mouse to the destination entity type.</span>
<div class="note note" id="loioeef0a787772546da8bb64168fba51823__note_N10054_N10051_N10049_N1001E_N10012_N10001"><span class="notetitle">Note</span> The destination OData Model Element
cannot be a complex type, function import. The cursor icon changes for
invalid destination OData Model Element.</div>
<div class="itemgroup stepresult">The association is created and a line with an arrow at both the ends
connects the shapes. </div></li>
<li class="li step stepexpand" id="loioeef0a787772546da8bb64168fba51823__step_N10056_N1001E_N10012_N10001"><span class="ph cmd">Create multiple bidirectional association as required. </span></li>
<li class="li step stepexpand" id="loioeef0a787772546da8bb64168fba51823__step_N1005F_N1001E_N10012_N10001"><span class="ph cmd">Choose the <span class="ph pname">Select </span><img src="BDA2.png" alt="" style="width:100px;height:20px"/> Icon in the Pallete to come
out of the association create mode.</span><ul class="ul choices" id="loioeef0a787772546da8bb64168fba51823__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="BDA3.png" alt="" style="width:304px;height:228px""/></p>
</li>
</ul>
<div class="note note" id="loioeef0a787772546da8bb64168fba51823__note_N10080_N1007D_N1005B_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 or by pressing <kbd class="key">F2</kbd>.
Every navigation property should have a unique name. </div>
<p class="p">On saving the project, the tree region populates the Entity Types, new
Association and the corresponding Navigation Properties. </p>
</li>
</ol>
</div>
</div></div>
</body>
</html>