<?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 : Table - View Association</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Table - View Association</description>
  <pubDate>Wed, 29 Jul 2026 08:54:55 -700</pubDate>
  <lastBuildDate>Mon, 15 Nov 2010 18:59:43 -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=2307</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>Table - View Association : First make sure that the storage...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2307&amp;PID=9128#9128</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> 2307<br /><strong>Posted:</strong> 15-Nov-2010 at 6:59pm<br /><br /><DIV>First make sure that the storage model definition of the EntityKey for the view-backed entity is correct.&nbsp; When a view is included in the EDMX the designer will try to infer an EntityKey and the inference isn't always correct.&nbsp; Next, when you add the association to the conceptual model, don't check the "Add foreign key properties" check box in the dialog, since presumably there's some sort of "EventId" column on the view that will point it back to the Event table.&nbsp; After creating the association, double click the association in the designer to bring up the Referential Constraint window (there's probably some other way of getting to this information, but I don't know it), and there set the principal and dependent "key" properties.&nbsp; That should be all that's needed.</DIV>]]>
   </description>
   <pubDate>Mon, 15 Nov 2010 18:59:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2307&amp;PID=9128#9128</guid>
  </item> 
  <item>
   <title>Table - View Association : I need the ability to navigate...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2307&amp;PID=9118#9118</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2307<br /><strong>Posted:</strong> 15-Nov-2010 at 10:03am<br /><br /><P>I need the ability to navigate from a table to a view. for example I have a table called Event that hold all the calls coming into a center. I have a view called EventFirstStep which holds only the first step of the event which will tell me the issue of the call. In my Event class I want to do the following:</P><DIV>&nbsp;</DIV><DIV>public string EventIssue</DIV><DIV>{</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get{</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this.EventFirstStep.Detail;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV>}</DIV><DIV>&nbsp;</DIV><DIV>In my EDMX I created an association between the EventFirstStep view and the Event Table. In my Event class I created the above code and it compiles fine.</DIV><DIV>&nbsp;</DIV><DIV>When I run the program I get the following error.</DIV><DIV>&nbsp;</DIV><DIV>Error&nbsp;1&nbsp;#error: 'DevForce requires that foreign key columns be included in the model. This must be set when the EDMX is first created. If you are upgrading from DevForce 2009, you cannot use the old model and should recreate it using the Entity Framework for .NET 4.0.&nbsp; The following associations were not set up with foreign key associations enabled: EventFirstStepEvent'&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>What do I need to do in addition to creating the association to make this work?</DIV>]]>
   </description>
   <pubDate>Mon, 15 Nov 2010 10:03:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2307&amp;PID=9118#9118</guid>
  </item> 
 </channel>
</rss>