<?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 : EntityReferenceStrategy on Navigation properties causing problems</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : EntityReferenceStrategy on Navigation properties causing problems</description>
  <pubDate>Wed, 13 May 2026 09:43:41 -700</pubDate>
  <lastBuildDate>Wed, 22 Feb 2012 19:05:38 -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=3284</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>EntityReferenceStrategy on Navigation properties causing problems : Thank you for the quick reply....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3284&amp;PID=12745#12745</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=906" rel="nofollow">ajhops</a><br /><strong>Subject:</strong> 3284<br /><strong>Posted:</strong> 22-Feb-2012 at 7:05pm<br /><br />Thank you for the quick reply.]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 19:05:38 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3284&amp;PID=12745#12745</guid>
  </item> 
  <item>
   <title>EntityReferenceStrategy on Navigation properties causing problems : Hi ajhops,I did a test in 6.1.2.0...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3284&amp;PID=12742#12742</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 3284<br /><strong>Posted:</strong> 22-Feb-2012 at 4:55pm<br /><br />Hi ajhops,<div><br></div><div>I did a test in 6.1.2.0 and it threw the same exception. Did the same test in 6.1.5.0 and it passed. So it looks like this has been fixed in 6.1.5.0.</div>]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 16:55:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3284&amp;PID=12742#12742</guid>
  </item> 
  <item>
   <title>EntityReferenceStrategy on Navigation properties causing problems : I am using 6.1.2.0. I hope you...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3284&amp;PID=12736#12736</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=906" rel="nofollow">ajhops</a><br /><strong>Subject:</strong> 3284<br /><strong>Posted:</strong> 22-Feb-2012 at 12:30pm<br /><br />I am using 6.1.2.0. I hope you can tell me if I'm doing something wrong or if this is a bug (and if it is fixed in a later build).<div><br></div><div>The summary is: when I set a reference strategy to DoNotLoad for one navigation property on an entity, other navigation properties on that entity begin to misbehave.</div><div><br></div><div>My parent entity is called "<b>Manual</b>" it has child "<b>Document</b>" and "<b>Author</b>" entities. I have done the following in my singleton repository:</div><div><br></div><div><pre style="font-family: C&#111;nsolas; font-size: 13px; -: initial; -attachment: initial; -origin: initial; -clip: initial; : white; -: initial initial; -repeat: initial initial; "><span style="color:#2b91af;">Manual</span>.<span style="color:#2b91af;">PropertyMetadata</span>.Documents.ReferenceStrategy&nbsp;=&nbsp;<span style="color:blue;">new</span>&nbsp;<span style="color:#2b91af;">EntityReferenceStrategy</span>(<span style="color:#2b91af;">EntityReferenceLoadStrategy</span>.DoNotLoad,&nbsp;<span style="color:#2b91af;">MergeStrategy</span>.OverwriteChanges);</pre></div><div><br></div><div>I want to control the loading of Documents myself, however I want Authors to behave as a default reference. When I set the ReferenceStrategy for Documents, I get exceptions when I try to use PendingEntityListResolved event for Authors</div><div><br></div><div><pre style="font-family: C&#111;nsolas; font-size: 13px; -: initial; -attachment: initial; -origin: initial; -clip: initial; : white; -: initial initial; -repeat: initial initial; "><span style="color:blue;">public</span>&nbsp;<span style="color:blue;">void</span>&nbsp;LoadAuthorsAsync(<span style="color:#2b91af;">Action</span>&lt;<span style="color:#2b91af;">IEnumerable</span>&lt;<span style="color:#2b91af;">Author</span>&gt;&gt;&nbsp;onSuccess)		{			<span style="color:blue;">if</span>&nbsp;(Authors.IsPendingEntityList)			{				<font color="#ff0000">Authors.PendingEntityListResolved&nbsp;+=&nbsp;(s,&nbsp;e)&nbsp;=&gt;&nbsp;onSuccess(Authors); //THROWS EXCEPTION</font>			}			<span style="color:blue;">else</span>			{				onSuccess(Authors);			}		}</pre><pre style="-: initial; -attachment: initial; -origin: initial; -clip: initial; : white; "><font face="C&#111;nsolas" size="3"><span style="line-height: 18px;">{System.ArgumentNullException: Value cannot be null.Parameter name: member   at IdeaBlade.EntityModel.EntityQueriedEventArgs.get_Results()}</span></font></pre><pre style="-: initial; -attachment: initial; -origin: initial; -clip: initial; : white; "><font face="C&#111;nsolas" size="3"><span style="line-height: 18px;"><br></span></font></pre><pre style="-: initial; -attachment: initial; -origin: initial; -clip: initial; : white; "><pre style="font-family: C&#111;nsolas; font-size: 13px; -: initial; -attachment: initial; -origin: initial; -clip: initial; : white; -: initial initial; -repeat: initial initial; "><span style="color:blue;">#region</span>&nbsp;Authors&nbsp;property &nbsp;&nbsp;&nbsp;&nbsp;<span style="color:gray;">///</span><span style="color:green;">&nbsp;</span><span style="color:gray;">&lt;summary&gt;</span><span style="color:green;">Gets&nbsp;the&nbsp;Authors.&nbsp;</span><span style="color:gray;">&lt;/summary&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">Bindable</span>(<span style="color:blue;">false</span>)&#093;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">Display</span>(Name=<span style="color:#a31515;">"Authors"</span>,&nbsp;AutoGenerateField=<span style="color:blue;">false</span>)&#093;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">DataMember</span>&#093;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">public</span>&nbsp;IbEm.<span style="color:#2b91af;">RelatedEntityList</span>&lt;<span style="color:#2b91af;">Author</span>&gt;&nbsp;Authors&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#ff0000">&nbsp;get&nbsp;{&nbsp;return&nbsp;PropertyMetadata.Authors.GetValue(this);&nbsp;} //LAST LINE IN DEBUGGER BEFORE EXCEPTION</font>&nbsp;&nbsp;&nbsp;&nbsp;}<span style="color:blue;">&nbsp;&nbsp;&nbsp;&nbsp;#endregion</span>&nbsp;Authors&nbsp;property</pre></pre><pre style="-: initial; -attachment: initial; -origin: initial; -clip: initial; : white; "><font face="C&#111;nsolas" size="3"><span style="line-height: 18px;"><br></span></font></pre></div>]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 12:30:55 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3284&amp;PID=12736#12736</guid>
  </item> 
 </channel>
</rss>