<?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 : Custom Association with multiple criteria</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Custom Association with multiple criteria</description>
  <pubDate>Wed, 13 May 2026 07:15:23 -700</pubDate>
  <lastBuildDate>Thu, 26 Apr 2012 14:50:20 -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=3396</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>Custom Association with multiple criteria :   Hi Von,You won&amp;#039;t be able...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13436#13436</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3396<br /><strong>Posted:</strong> 26-Apr-2012 at 2:50pm<br /><br />Hi Von,<div>&nbsp;</div><div>You won't be able to create an association where the FK is part of a composite key. Since it's just a FK you better off simply adding it to your CustomerDetails entity.</div><div>&nbsp;</div><div>Since this is more of a design question I think you'd benefit more from our Professional Services Team assistance. </div><div>Let me know if this interests you, so I can have someone get in touch with you in this regard.</div><div>&nbsp;</div><div>Silvio.</div>]]>
   </description>
   <pubDate>Thu, 26 Apr 2012 14:50:20 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13436#13436</guid>
  </item> 
  <item>
   <title>Custom Association with multiple criteria : Hi Silvio,Would that be possible...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13411#13411</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3396<br /><strong>Posted:</strong> 25-Apr-2012 at 1:35am<br /><br />Hi Silvio,<div><br></div><div>Would that be possible with Database First Design? Are there some workarounds?</div><div><br></div><div>THanks,</div><div>Von</div>]]>
   </description>
   <pubDate>Wed, 25 Apr 2012 01:35:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13411#13411</guid>
  </item> 
  <item>
   <title>Custom Association with multiple criteria :   Von, You might want to take...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13399#13399</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3396<br /><strong>Posted:</strong> 24-Apr-2012 at 11:50am<br /><br />Von,<div> </div><div>You might want to take a look at the Code First documentation on details on how to accomplish your objective (if possible):</div><div>&nbsp;</div><div><a href="http://msdn.microsoft.com/en-us/data/aa937723" target="_blank">http://msdn.microsoft.com/en-us/data/aa937723</a></div><div><a href="http://msdn.microsoft.com/en-us/data/hh134698" target="_blank">http://msdn.microsoft.com/en-us/data/hh134698</a></div><div><a href="http://blogs.msdn.com/b/ad&#111;net/archive/2011/03/15/ef-4-1-code-first-walkthrough.aspx" target="_blank">http://blogs.msdn.com/b/adonet/archive/2011/03/15/ef-4-1-code-first-walkthrough.aspx</a></div><div><a href="http://blogs.msdn.com/b/ad&#111;net/archive/2010/12/06/ef-feature-ctp5-fluent-api-samples.aspx" target="_blank">http://blogs.msdn.com/b/adonet/archive/2010/12/06/ef-feature-ctp5-fluent-api-samples.aspx</a></div><div><a href="http://social.msdn.microsoft.com/Forums/is/adodotnetentityframework/thread/2cb02baa-0b23-48b3-a529-92d56c6ff7dd" target="_blank">http://social.msdn.microsoft.com/Forums/is/adodotnetentityframework/thread/2cb02baa-0b23-48b3-a529-92d56c6ff7dd</a></div><div>&nbsp;</div><div>I hope this helps.</div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div>]]>
   </description>
   <pubDate>Tue, 24 Apr 2012 11:50:27 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13399#13399</guid>
  </item> 
  <item>
   <title>Custom Association with multiple criteria : Hi Silvio,Here&amp;#039;s the original...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13382#13382</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3396<br /><strong>Posted:</strong> 23-Apr-2012 at 5:45pm<br /><br /><div style="text-align: left; : rgb251, 251, 253; ">Hi Silvio,</div><div style="text-align: left; : rgb251, 251, 253; "><br></div><div style="text-align: left; : rgb251, 251, 253; ">Here's the original problem that we solved.</div><div style="text-align: left; : rgb251, 251, 253; "><b><br></b></div><div style="text-align: left; : rgb251, 251, 253; "><b>Customer</b></div><div style="text-align: left; : rgb251, 251, 253; ">CustomerID</div><div style="text-align: left; : rgb251, 251, 253; ">Name</div><div style="text-align: left; : rgb251, 251, 253; ">LocationID</div><div style="text-align: left; : rgb251, 251, 253; "><br></div><div style="text-align: left; : rgb251, 251, 253; "><b>Invoice</b></div><div style="text-align: left; : rgb251, 251, 253; ">InvoiceID</div><div style="text-align: left; : rgb251, 251, 253; ">CustomerID</div><div style="text-align: left; : rgb251, 251, 253; ">Description</div><div style="text-align: left; : rgb251, 251, 253; ">InvoiceLocationID</div><div style="text-align: left; : rgb251, 251, 253; "><br></div><div style="text-align: left; : rgb251, 251, 253; ">I want to have a one to many relationship with Customer and Invoice but the criteria would be:</div><div style="text-align: left; : rgb251, 251, 253; "><br></div><div style="text-align: left; : rgb251, 251, 253; "><b>Customer&nbsp;<span ="apple-tab-span"="" style="white-space: pre; ">	</span>Invoice</b></div><div style="text-align: left; : rgb251, 251, 253; ">CustomerID = &nbsp;CustomerID</div><div style="text-align: left; : rgb251, 251, 253; ">LocationID &nbsp; = &nbsp;LocationID</div><div style="text-align: left; : rgb251, 251, 253; "><br></div><div style="text-align: left; : rgb251, 251, 253; ">Now, what about adding another table and link it with <b>Customer </b>such as <b>CustomerDetails</b></div><div style="text-align: left; : rgb251, 251, 253; "><b><br></b></div><div style="text-align: left; : rgb251, 251, 253; "><b>CustomerDetails</b></div><div style="text-align: left; : rgb251, 251, 253; ">DetailID</div><div style="text-align: left; : rgb251, 251, 253; ">Description</div><div style="text-align: left; : rgb251, 251, 253; ">CustomerID</div><div style="text-align: left; : rgb251, 251, 253; "><br></div><div style="text-align: left; : rgb251, 251, 253; ">How do I associate this to Customer by bypassing the LocationID because I don't need it in this association.</div><div style="text-align: left; : rgb251, 251, 253; "><br></div><div style="text-align: left; : rgb251, 251, 253; ">Thanks,</div><div style="text-align: left; : rgb251, 251, 253; ">Von</div>]]>
   </description>
   <pubDate>Mon, 23 Apr 2012 17:45:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13382#13382</guid>
  </item> 
  <item>
   <title>Custom Association with multiple criteria :   Von,Not sure I understand...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13373#13373</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3396<br /><strong>Posted:</strong> 23-Apr-2012 at 10:09am<br /><br />Von,<div>&nbsp;</div><div>Not sure I understand the question.</div><div>You are trying to associate 2 tables, but don't want to use the PK_FK association?</div><div>&nbsp;</div><div>Please clarify.</div><div>&nbsp;</div><div>Silvio.</div>]]>
   </description>
   <pubDate>Mon, 23 Apr 2012 10:09:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13373#13373</guid>
  </item> 
  <item>
   <title>Custom Association with multiple criteria : Hi Silvio,That works for us.However,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13372#13372</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3396<br /><strong>Posted:</strong> 22-Apr-2012 at 11:31pm<br /><br />Hi Silvio,<div><br></div><div>That works for us.</div><div>However, since let's say for example I have my table marked 2 of its column as Entity Key and tried to associate it again with another table but I don't need the criteria being map to the other column. How would I do it?</div><div><br></div><div>Thanks,</div><div>Von</div>]]>
   </description>
   <pubDate>Sun, 22 Apr 2012 23:31:16 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13372#13372</guid>
  </item> 
  <item>
   <title>Custom Association with multiple criteria :   In model first you mark the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13363#13363</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3396<br /><strong>Posted:</strong> 19-Apr-2012 at 4:27pm<br /><br /><div>&nbsp;</div><div>In model first you mark the properties as Entity Keys and set the Referential Constraint accordingly.</div><div>In database first, you will find a solution at <a href="http://stackoverflow.com/questi&#111;ns/1545571/how-do-i-make-a-composite-key-with-sql-server-management-studio" target="_blank">http://stackoverflow.com/questions/1545571/how-do-i-make-a-composite-key-with-sql-server-management-studio</a></div><div>&nbsp;</div><div>Silvio.</div>]]>
   </description>
   <pubDate>Thu, 19 Apr 2012 16:27:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13363#13363</guid>
  </item> 
  <item>
   <title>Custom Association with multiple criteria : Hi,I&amp;#039;ll try to look at it....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13362#13362</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3396<br /><strong>Posted:</strong> 19-Apr-2012 at 4:14pm<br /><br />Hi,<div><br></div><div>I'll try to look at it. :)</div><div>How about not Code First?</div><div><br></div><div>Thanks,</div><div>VOn</div>]]>
   </description>
   <pubDate>Thu, 19 Apr 2012 16:14:02 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13362#13362</guid>
  </item> 
  <item>
   <title>Custom Association with multiple criteria : Hi Vonzkie,Are you talking about...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13356#13356</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3396<br /><strong>Posted:</strong> 19-Apr-2012 at 12:22pm<br /><br /><div>Hi Vonzkie,</div><div>&nbsp;</div><div>Are you talking about Code First?</div><div>&nbsp;</div><div>If that's the case you must set the order of the PK when working with composite keys:</div><div>&nbsp;</div><div><font color="#2b91af" size="2" face="C&#111;nsolas"><font color="#2b91af" size="2" face="C&#111;nsolas"><font color="#2b91af" size="2" face="C&#111;nsolas">Column</font></font></font><font size="2" face="C&#111;nsolas"><font size="2" face="C&#111;nsolas">(</font></font><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas">"CustomerID"</font></font></font><font size="2" face="C&#111;nsolas"><font size="2" face="C&#111;nsolas">, Order=0)&#093;</font></font></div><div>&nbsp;</div><div>You can check our Code First samples in the <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/code-sample-code-first-tour" target="_blank">DevForce Resource Center</a> for more details in creating CodeFirst Entities/Navigation Properties.</div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div>]]>
   </description>
   <pubDate>Thu, 19 Apr 2012 12:22:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13356#13356</guid>
  </item> 
  <item>
   <title>Custom Association with multiple criteria : Correction:Customer	InvoiceCustomerID...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13347#13347</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3396<br /><strong>Posted:</strong> 19-Apr-2012 at 2:45am<br /><br />Correction:<div><br></div><div style="text-align: left; : rgb251, 251, 253; "><b>Customer&nbsp;<span ="apple-tab-span"="" style="white-space: pre; ">	</span>Invoice</b></div><div style="text-align: left; : rgb251, 251, 253; ">CustomerID = &nbsp;CustomerID</div><div><span style=": rgb251, 251, 253; text-align: left; ">LocationID &nbsp; = &nbsp;InvoiceLocationID</span>&nbsp;</div>]]>
   </description>
   <pubDate>Thu, 19 Apr 2012 02:45:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13347#13347</guid>
  </item> 
  <item>
   <title>Custom Association with multiple criteria : Hi,How can I create a custom association...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13346#13346</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3396<br /><strong>Posted:</strong> 19-Apr-2012 at 2:44am<br /><br />Hi,<div><br></div><div>How can I create a custom association in Devforce that have multiple criteria?</div><div><br></div><div>E.g:&nbsp;</div><div><br></div><div><b>Customer</b></div><div>CustomerID</div><div>Name</div><div>LocationID</div><div><br></div><div><b>Invoice</b></div><div>InvoiceID</div><div>CustomerID</div><div>Description</div><div>InvoiceLocationID</div><div><br></div><div>I want to have a one to many relationship with Customer and Invoice but the criteria would be:</div><div><br></div><div><b>Customer&nbsp;<span ="Apple-tab-span" style="white-space:pre">	</span>Invoice</b></div><div>CustomerID = &nbsp;CustomerID</div><div>LocationID &nbsp; = &nbsp;LocationID</div><div><br></div><div>How can I do that?</div><div><br></div><div>Thanks,</div><div>Von</div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Thu, 19 Apr 2012 02:44:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3396&amp;PID=13346#13346</guid>
  </item> 
 </channel>
</rss>