<?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 : Problem with Navigation Properties</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Problem with Navigation Properties</description>
  <pubDate>Sun, 12 Apr 2026 23:35:13 -700</pubDate>
  <lastBuildDate>Fri, 12 Aug 2011 10:58:14 -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=2885</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>Problem with Navigation Properties :   Sure thing.I&amp;#039;ll send...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11415#11415</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> 2885<br /><strong>Posted:</strong> 12-Aug-2011 at 10:58am<br /><br />Sure thing.<div>I'll send you a message as soon as it's fixed.</div>]]>
   </description>
   <pubDate>Fri, 12 Aug 2011 10:58:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11415#11415</guid>
  </item> 
  <item>
   <title>Problem with Navigation Properties : Thanks for the update and yes...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11414#11414</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=543" rel="nofollow">pk55</a><br /><strong>Subject:</strong> 2885<br /><strong>Posted:</strong> 12-Aug-2011 at 10:43am<br /><br />Thanks for the update and yes we'd take a patch build with a fix.]]>
   </description>
   <pubDate>Fri, 12 Aug 2011 10:43:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11414#11414</guid>
  </item> 
  <item>
   <title>Problem with Navigation Properties :   Hi Stephen,I submitted the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11413#11413</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> 2885<br /><strong>Posted:</strong> 12-Aug-2011 at 10:42am<br /><br />Hi Stephen,<div>&nbsp;</div><div>I submitted the bug yesterday. (08/11/11)</div><div>While we still don't have a fix, we are working on it and I will let you know as soon as it's done as well as provide you with a patch (if you wish so).</div><div>&nbsp;</div><div>Kind regards,</div><div>&nbsp;&nbsp; Silvio.</div>]]>
   </description>
   <pubDate>Fri, 12 Aug 2011 10:42:27 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11413#11413</guid>
  </item> 
  <item>
   <title>Problem with Navigation Properties : Any update on this? We have to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11412#11412</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=543" rel="nofollow">pk55</a><br /><strong>Subject:</strong> 2885<br /><strong>Posted:</strong> 12-Aug-2011 at 10:32am<br /><br />Any update on this?&nbsp; We have to decide if we're going to back off of the official 6.1.2 release&nbsp;and go back to the 6.1.2."e" patch build (we need the stored procedure fixes but don't care about code first). And we have to decide that by Monday.<DIV></DIV><DIV></DIV>]]>
   </description>
   <pubDate>Fri, 12 Aug 2011 10:32:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11412#11412</guid>
  </item> 
  <item>
   <title>Problem with Navigation Properties : Thanks for the update Stephen,I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11402#11402</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> 2885<br /><strong>Posted:</strong> 10-Aug-2011 at 6:52pm<br /><br /><p>Thanks for the update Stephen,</p><div>&nbsp;</div><div>I am in the process of reproducing the issue here and will file a bug.</div><div>&nbsp;</div><div>Silvio.</div>]]>
   </description>
   <pubDate>Wed, 10 Aug 2011 18:52:55 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11402#11402</guid>
  </item> 
  <item>
   <title>Problem with Navigation Properties : After further investigation, I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11401#11401</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=613" rel="nofollow">stephenmcd1</a><br /><strong>Subject:</strong> 2885<br /><strong>Posted:</strong> 10-Aug-2011 at 5:16pm<br /><br />After further investigation, I have more information. &nbsp;I don't know if the following is related to my original issue but it seems like it might be.<div><br></div><div>It seems that&nbsp;EntityReferenceStrategy.NoLoad causes Includes to be broken - and I was able to reproduce this in a Northwind database pretty easily. &nbsp;For example, this code works with no problems:</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode">var em = new NorthwindIBEntities();</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>//Grab a particular employee and his/her orders (testing on the server so we can do it synchronously)</div><div>var employeeAndOrders = em.Employees.Include(e =&gt; e.Orders).Single(e =&gt; e.EmployeeID == 5);</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>//See what Orders are in the cache</div><div>var orders1 = em.FindEntities&lt;Order&gt;(EntityState.AllButDetached).ToList();</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>//See what Orders are in the Navigation Property</div><div>var orders2 = employeeAndOrders.Orders.ToList();</div><div><br></div><div>//There should be 42 in both</div><div>Assert.AreEqual(42, orders1.Count);</div><div>Assert.AreEqual(42, orders2.Count);</pre></td></tr></table></div><div><br></div><div>But just by adding:</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode">Employee.PropertyMetadata.Orders.ReferenceStrategy = EntityReferenceStrategy.NoLoad;</pre></td></tr></table></div><div><br></div><div>the test will fail and both lists will be empty. &nbsp;Previously, the Reference Strategy didn't affect includes. &nbsp;Did something change with this? &nbsp;I'm guessing this issue is related to the one I'm having above where the Navigation Properties aren't getting populated.</div>]]>
   </description>
   <pubDate>Wed, 10 Aug 2011 17:16:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11401#11401</guid>
  </item> 
  <item>
   <title>Problem with Navigation Properties : After upgrading to 6.1.2.0, we&amp;#039;ve...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11399#11399</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=613" rel="nofollow">stephenmcd1</a><br /><strong>Subject:</strong> 2885<br /><strong>Posted:</strong> 10-Aug-2011 at 2:22pm<br /><br />After upgrading to 6.1.2.0, we've started experiencing some odd behavior with Navigation Properties. &nbsp;I've been trying to isolate the code that is causing problems or reproduce the bad behavior in a NorthwindDb, but I haven't had much luck.<div><br></div><div>As I said, I haven't had much problems narrowing it down, but sometimes Navigation Properties will have the Null Entity in them, even though the referenced entity is in the cache. &nbsp;Also, we have all our Navigation Properties set to ReferenceStrategy.NoLoad. &nbsp;So code like this works fine:</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode">const int orderId = 10248;</div><div><br></div><div>//I can get the order details out of the EM like this - so I know they are in the cache</div><div><span ="Apple-style-span">var details1 = em.OrderDetails.With(QueryStrategy.CacheOnly).Where(od =&gt; od.OrderID ==&nbsp;</span>orderId<span ="Apple-style-span">).ToList();</span></div><div><br></div><div>//details1 will now have 3 items in it</div><div><br></div><div>//Grab the order and then try to get it's details with the navigation property...</div><div><span ="Apple-style-span">var order = em.Orders.With(QueryStrategy.CacheOnly).Single(o =&gt; o.OrderID ==&nbsp;</span>orderId<span ="Apple-style-span">);</span></div><div><span ="Apple-style-span">//order is the correct entity</span></div><div><span ="Apple-style-span"><br></span></div><div><span ="Apple-style-span">var details2 = order.OrderDetails.ToList();</span></div><div>//details2 is just an empty list!</pre></td></tr></table></div><div><br></div><div>This all worked fine before we upgraded to 6.1.2.0 - in fact, it even worked in an early 6.1.2 build that you gave us (I believe it was 6.1.2.0e.</div><div><br></div><div>The way we load data into our entity manager could be part of the problem. &nbsp;We bulk load data through&nbsp;multiple&nbsp;InvokeServerMethodAsync calls that return EntityCacheStates. &nbsp;The problem only seems to happen when the two entities involved (in the case above, that would be Order and OrderDetails) are loaded in two different batches. &nbsp;I'm thinking maybe there is a problem with how the navigation properties get 'fixed up' when RestoreCacheState is called.</div><div><br></div><div>I'm still trying to see if I can narrow down the problem further but I wanted to&nbsp;post here in case there is anything that might jump out....or something that maybe I should check.</div><div><br></div><div>Thanks,</div><div>-Stephen</div>]]>
   </description>
   <pubDate>Wed, 10 Aug 2011 14:22:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2885&amp;PID=11399#11399</guid>
  </item> 
 </channel>
</rss>