<?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 : Joining EntityRelations from two seperate queries</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Joining EntityRelations from two seperate queries</description>
  <pubDate>Fri, 10 Apr 2026 20:04:25 -700</pubDate>
  <lastBuildDate>Mon, 10 Sep 2012 12:42: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=3613</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>Joining EntityRelations from two seperate queries :   Hi Matt,It is possible to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3613&amp;PID=14388#14388</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> 3613<br /><strong>Posted:</strong> 10-Sep-2012 at 12:42pm<br /><br />Hi Matt,<div>&nbsp;</div><div>It is possible to query for Teams, and then later query for Players on one of these teams&nbsp;and not have a PendingEntityList involved.&nbsp; DevForce can't know with any certainty that all the players for a team are already in cache, and so takes the safe approach of issuing a query to ensure everything is loaded.&nbsp; If <em>you</em> know that all of a team's players are in cache you can turn off this default behavior by setting the EntityReferenceStrategy for the relation, like this:</div><div>&nbsp;</div><div>&nbsp; Team.PropertyMetadata.Players.ReferenceStrategy = EntityReferenceStrategy.NoLoad</div><div>&nbsp;</div><div>The "NoLoad" strategy tells DevForce to look only in cache for the related items.&nbsp; </div><div>&nbsp;</div><div>Here's some more information on the reference strategy - <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/navigati&#111;n-properties-data-retrieval" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/navigation-properties-data-retrieval</a>.</div>]]>
   </description>
   <pubDate>Mon, 10 Sep 2012 12:42:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3613&amp;PID=14388#14388</guid>
  </item> 
  <item>
   <title>Joining EntityRelations from two seperate queries : Hello.Say there is a Team object...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3613&amp;PID=14370#14370</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1499" rel="nofollow">matt.cavagnaro</a><br /><strong>Subject:</strong> 3613<br /><strong>Posted:</strong> 07-Sep-2012 at 12:20pm<br /><br />Hello.<br><br>Say there is a Team object for a given type of sport. And a Player object which has a FK to Team.<br><br>I'm querying for all the Team objects, then later, after the user selects a certain option I'm querying for all of the Player objects seperately.<br><br>Normally, I think the easiest way to go about it would be to Query for Teams with an .Include(i =&gt; i.Players) option. However, in our case this leads to time outs for our users, we have hundreds of Team objects and each Team may more than 1000 Players with their own navigation properties that need Includes. We have a custom class that divides larger queries into several smaller chunks, but this does not chunk Includes.<br><br>I guess I want to know if it's possible to Query for Team objects, then later, on demand, be able to query for the Player objects associated with any given team and have the Team's Players collection not be a PendingEntityList.<br><br>I've tried two separate queries from the same EntityManager, so by my understanding they should definitly be in the same cache, but after querying for Players for a given team, the entire collection of Team.Players lazy loads when I try to access it.<br><br>Also, if, after querying for Players with an Include on Team, I do<br><br>IEnumerable&lt;Team&gt; teams = Players.Select(i =&gt; i.Teams).Distinct();<br><br>The Team objects in teams all say that .Players is a PendingEntityList.<br><br>Hopefully this is all clear, if clarification is needed let me know and I'll try my best to reword things. Been reading about this all morning and haven't really gotten closer to a solution.<br>]]>
   </description>
   <pubDate>Fri, 07 Sep 2012 12:20:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3613&amp;PID=14370#14370</guid>
  </item> 
 </channel>
</rss>