<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Adding navigation properties</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Adding navigation properties</description>
  <pubDate>Mon, 20 Apr 2026 23:18:54 -700</pubDate>
  <lastBuildDate>Mon, 18 May 2009 13:39:06 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=1098</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Adding navigation properties : I went through all this again,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=4561#4561</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=300" rel="nofollow">pucsoftware</a><br /><strong>Subject:</strong> 1098<br /><strong>Posted:</strong> 18-May-2009 at 1:39pm<br /><br />I went through all this again, slowly, and got a completed entity model. This time I did one table at a time, first doing the navigation properties, then the Associations, saving after each changes,&nbsp;and didn't run into any problems. Before I was jumping around changing several tables, navigation and associations, all at the same time before saving. I probably created some type of conflict without realizing it. If I can reproduce this some time in the future I'll send you the corrupted model. Thanks for your efforts.<DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 18 May 2009 13:39:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=4561#4561</guid>
  </item> 
  <item>
   <title>Adding navigation properties :   Originally posted by pucsoftwareI...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=4558#4558</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 1098<br /><strong>Posted:</strong> 18-May-2009 at 12:22pm<br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by pucsoftware</strong></em><br /><br />I started creating a new model and I'm having problems with renaming navigation properties in the object model. I'll be working with if for a while, changing the names of the Navigation properties and the Association names, periodically saving it. Eventually, I get a nondescript error when saving. I end up having to close the object mapper without saving the changes. However, the model is in an invalid state. The .Net entity designer won't display the objects and shows an error:<div>&nbsp;</div><div>Warning&nbsp;1&nbsp;Error 11004: Association 'FK_SX_STAP_REJECTION_LU_STAP_REJECTION' has no association set.&nbsp;D:\Projects\Windows\Stap\StapDb\StapEntityModel.edmx&nbsp;1516&nbsp;9&nbsp;StapDb<br></div></td></tr></table><br><br>I failed in my effort to reproduce the problem (steps described below). Perhaps you can send us your corrupted .edmx, .ibedmx, and associated designer code files (to support@ideaBlade.com).<br><br>Here's what I did:<br><ol><li>In NorthwindIB, I added three columns to the Order table: EmployeeId2, EmployeeId3, and EmployeeId4.&nbsp; (It already had an EmployeeID.)</li><li>Generated a new Entity Data Model. The Order entity got navigation properties Employee, Employee1, Employee2, and Employee3. </li><li>In the Object Mapper, I renamed the Employee-related navigation properties to Employee1, Employee2, Employee3, and Employee4 (moving backward from the one with the highest-numbered suffix). Saved the work and closed the Object Mapper.</li><li>Reopened the Object Mapper, renamed the properties to Employee10, Employee09, Employee08, and Employee07 (again moving backward from the one with the highest-numbered suffix).&nbsp; Saved the work but did not exit the Object Mapper.</li><li>Renamed the properties to Employee99,Employee98, Employee97, and Employee96.&nbsp; Saved the work but did not exitthe Object Mapper.</li><li>Repeated step 5 with different names, two more times.</li><li>Closed the Object Mapper and opened the Entity Data Model in the Entity Data Model designer. No problems, all properties named as requested.</li></ol><br>]]>
   </description>
   <pubDate>Mon, 18 May 2009 12:22:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=4558#4558</guid>
  </item> 
  <item>
   <title>Adding navigation properties :   Originally posted by pucsoftwareThe...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=4557#4557</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 1098<br /><strong>Posted:</strong> 18-May-2009 at 11:46am<br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by pucsoftware</strong></em><br /><br /><div>The object mapper automatically names them:<div>LU_DEVICE_CODE</div><div>LU_DEVICE_CODE1</div><div>LU_DEVICE_CODE2</div><div>LU_DEVICE_CODE3</div><div>&nbsp;</div><div>Which, to me, makes it a little confusing since the Navigations are not corresponding to the original fields:</div><div>&nbsp;</div><div><div>DEVICE_CODE1 -&gt; LU_DEVICE_CODE&nbsp;&nbsp;&nbsp; ( this one defaults to no number )</div><div><div>DEVICE_CODE2 -&gt; LU_DEVICE_CODE1</div></div><div><div>DEVICE_CODE3 -&gt; LU_DEVICE_CODE2</div></div><div><div>DEVICE_CODE4 -&gt; LU_DEVICE_CODE3</div><div>&nbsp;</div><div>So, I was renaming them to be:</div><div>&nbsp;</div><div><div>DEVICE_CODE1 -&gt; LuDeviceCode1</div><div><div>DEVICE_CODE2 -&gt;&nbsp;LuDeviceCode2</div></div><div><div>DEVICE_CODE3 -&gt;&nbsp;LuDeviceCode3</div><div>DEVICE_CODE4 -&gt;&nbsp;LuDeviceCode4</div><div>&nbsp;</div></div></div></div></div></div></td></tr></table><br><br>It's the ADO.NET Entity Data Model designer, not the DevForce Object Mapper, that makes the initial name assignments. It uses the name of the type on the other end of the association (LU_DEVICE_CODE) rather than the name of the foreign key; and that's generally a good thing, since foreign keys often have names that aren't appropriate for an entity (like OrderId, etc.).&nbsp;&nbsp; If you have more than one navigation property that returns the same type, the EF code generator then just starts appending integer suffixes, leaving it up to you to adjust the names to something that's meaningful to you.<br><br>But you should be able to do it!<br>]]>
   </description>
   <pubDate>Mon, 18 May 2009 11:46:00 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=4557#4557</guid>
  </item> 
  <item>
   <title>Adding navigation properties : Let me cook up a similar database...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=4556#4556</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 1098<br /><strong>Posted:</strong> 18-May-2009 at 11:37am<br /><br />Let me cook up a similar database structure and see if I can reproduce what you're seeing. I'll be back.<br>]]>
   </description>
   <pubDate>Mon, 18 May 2009 11:37:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=4556#4556</guid>
  </item> 
  <item>
   <title>Adding navigation properties : I started creating a new model...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=4552#4552</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=300" rel="nofollow">pucsoftware</a><br /><strong>Subject:</strong> 1098<br /><strong>Posted:</strong> 18-May-2009 at 8:44am<br /><br />I started creating a new model and I'm having problems with renaming navigation properties in the object model. I'll be working with if for a while, changing the names of the Navigation properties and the Association names, periodically saving it. Eventually, I get a nondescript error when saving. I end up having to close the object mapper without saving the changes. However, the model is in an invalid state. The .Net entity designer won't display the objects and shows an error:<DIV>&nbsp;</DIV><DIV>Warning&nbsp;1&nbsp;Error 11004: Association 'FK_SX_STAP_REJECTION_LU_STAP_REJECTION' has no association set.&nbsp;D:\Projects\Windows\Stap\StapDb\StapEntityModel.edmx&nbsp;1516&nbsp;9&nbsp;StapDb<BR></DIV><DIV>I worked on this all day Friday. I ended up having to start over with the project. I've had to start completely over&nbsp;3 times now and currently it is corrupted.&nbsp;Should I&nbsp;be renaming the Navigation and Association properties? I've done this before and&nbsp;never had any problems. The only difference&nbsp;that I can think of is with main table. It has several fields that are&nbsp;related to the same lookup table. for example:</DIV><DIV>&nbsp;</DIV><DIV>DEVICE_CODE1 -&gt; LU_DEVICE_CODE</DIV><DIV><DIV>DEVICE_CODE2 -&gt; LU_DEVICE_CODE</DIV></DIV><DIV><DIV>DEVICE_CODE3 -&gt; LU_DEVICE_CODE</DIV></DIV><DIV><DIV>DEVICE_CODE4 -&gt; LU_DEVICE_CODE</DIV><DIV>&nbsp;</DIV><DIV>The object mapper automatically names them:</DIV><DIV>LU_DEVICE_CODE</DIV><DIV>LU_DEVICE_CODE1</DIV><DIV>LU_DEVICE_CODE2</DIV><DIV>LU_DEVICE_CODE3</DIV><DIV>&nbsp;</DIV><DIV>Which, to me, makes it a little confusing since the Navigations are not corresponding to the original fields:</DIV><DIV>&nbsp;</DIV><DIV><DIV>DEVICE_CODE1 -&gt; LU_DEVICE_CODE&nbsp;&nbsp;&nbsp; ( this one defaults to no number )</DIV><DIV><DIV>DEVICE_CODE2 -&gt; LU_DEVICE_CODE1</DIV></DIV><DIV><DIV>DEVICE_CODE3 -&gt; LU_DEVICE_CODE2</DIV></DIV><DIV><DIV>DEVICE_CODE4 -&gt; LU_DEVICE_CODE3</DIV><DIV>&nbsp;</DIV><DIV>So, I was renaming them to be:</DIV><DIV>&nbsp;</DIV><DIV><DIV>DEVICE_CODE1 -&gt; LuDeviceCode1</DIV><DIV><DIV>DEVICE_CODE2 -&gt;&nbsp;LuDeviceCode2</DIV></DIV><DIV><DIV>DEVICE_CODE3 -&gt;&nbsp;LuDeviceCode3</DIV><DIV>DEVICE_CODE4 -&gt;&nbsp;LuDeviceCode4</DIV><DIV>&nbsp;</DIV><DIV>This table has 4 sets of fields that are setup this way. It's a legacy application that I can't change, too. </DIV><DIV>Not sure if this causes the problem as the errors don't seem to&nbsp;reflect these particular fields, but the results have been pretty consistent - corrupted entity model that I can't fix. </DIV><DIV>&nbsp;</DIV><DIV>Any suggestions?</DIV></DIV></DIV></DIV></DIV><DIV>&nbsp;</DIV></DIV>]]>
   </description>
   <pubDate>Mon, 18 May 2009 08:44:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=4552#4552</guid>
  </item> 
  <item>
   <title>Adding navigation properties : There are plans to beef up the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=3936#3936</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 1098<br /><strong>Posted:</strong> 25-Feb-2009 at 8:07am<br /><br />There are plans to beef up the functionality within the Object Mapper, but we just haven't had the time and resources to get to it yet.&nbsp; So unfortunately for now you will still need to use the EDM designer (and we agree, it is horrible to work with :)).]]>
   </description>
   <pubDate>Wed, 25 Feb 2009 08:07:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=3936#3936</guid>
  </item> 
  <item>
   <title>Adding navigation properties : Hi,Are there any plans to support...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=3933#3933</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 1098<br /><strong>Posted:</strong> 24-Feb-2009 at 12:11pm<br /><br />Hi,<br><br>Are there any plans to support adding navigation properties through the object mapper like in classic? One database we are currently working against does not have relationships setup in the database, and we cannot add them due to legacy applications currently in use. I realize you can do it with the EF designer but frankly it is horrible to work with!<br><br>Thanks,<br><br>Mark<br>]]>
   </description>
   <pubDate>Tue, 24 Feb 2009 12:11:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1098&amp;PID=3933#3933</guid>
  </item> 
 </channel>
</rss>