<?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 : relationship mapping on foreign keys</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : relationship mapping on foreign keys</description>
  <pubDate>Thu, 16 Apr 2026 15:58:08 -700</pubDate>
  <lastBuildDate>Tue, 10 Feb 2009 12:01:37 -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=1087</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>relationship mapping on foreign keys : First I should say that because...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1087&amp;PID=3907#3907</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> 1087<br /><strong>Posted:</strong> 10-Feb-2009 at 12:01pm<br /><br /><P>First I should say that because DevForce EF uses the ADO.NET Entity Framework for the underlying entity model that we're dependent on the rules enforced by EF, which are in general somewhat strict.&nbsp; What you're seeing here is a message from EF as you build your model via the Entity Data Model designer, so the error itself is not raised by DevForce.&nbsp; </P><DIV>Apparently this error is a known limitation in EF - here's what a Microsoft engineer said on the ADO.NET EF forum: </DIV><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><DIV><EM>Yes, this is a restriction of the current version of the EF: It does not allow foreign keys <FONT face=Arial size=2>which are only partly inside of the primary key. It is not a limitation of the tools, but of the framework itself."</FONT></EM></DIV><DIV><EM><FONT face=Arial size=2></FONT></EM>&nbsp;</DIV></BLOCKQUOTE><DIV dir=ltr><FONT face=Arial size=2>In your situation I don't know if it would make sense to a) not mark the Employee.OrganizationId as part of the primary key, or b) </FONT><FONT face=Arial size=2>add OrganizationId to the Person table, or c)&nbsp;add surrogate keys to these tables, or d) leave the association unmapped.&nbsp; </FONT><FONT face=Arial size=2></FONT></DIV><DIV dir=ltr>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 10 Feb 2009 12:01:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1087&amp;PID=3907#3907</guid>
  </item> 
  <item>
   <title>relationship mapping on foreign keys : Hi,  We are having a problem...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1087&amp;PID=3895#3895</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=446" rel="nofollow">egoren</a><br /><strong>Subject:</strong> 1087<br /><strong>Posted:</strong> 09-Feb-2009 at 2:37pm<br /><br /><DIV>Hi,</DIV><DIV>&nbsp;</DIV><DIV>We are having a problem with DevForce EF. </DIV><DIV>We have the following database schema:<BR>Person { *PersonId }<BR>Employee { *PersonId, *OrganizationId, PositionId }<BR>Position { *PositionId, *OrganizationId }<BR>&#091;The * represents the primary key(s)&#093;<BR>When adding the table in the ebmx diagram, the relation between Employee and Position is not created and we receive this error :<BR>warning 6030: The relationship 'FK_Employee_Position' uses the set of foreign keys '{OrganizationId, PositionId}' that are partially contained in the set of primary keys '{OrganizationId, PersonId}' of the table 'Employee'. The set of foreign keys must be fully contained in the set of primary keys, or fully not contained in the set of primary keys to be mapped to a model.<BR></DIV><DIV>Is there a way to create this relation in DevForce EF like we could (and do) in DevForce Classic?</DIV>]]>
   </description>
   <pubDate>Mon, 09 Feb 2009 14:37:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1087&amp;PID=3895#3895</guid>
  </item> 
 </channel>
</rss>