<?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 : Deleted entity not removed from EntityCache</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Deleted entity not removed from EntityCache</description>
  <pubDate>Wed, 13 May 2026 07:14:32 -700</pubDate>
  <lastBuildDate>Thu, 26 Apr 2012 10:08:34 -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=3407</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>Deleted entity not removed from EntityCache :   Hi Rasmus,After further investigation,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3407&amp;PID=13433#13433</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> 3407<br /><strong>Posted:</strong> 26-Apr-2012 at 10:08am<br /><br />Hi Rasmus,<div>&nbsp;</div><div>After further investigation, I could repro the issue. </div><div>The difference between my initial tests and the later is that at first I was querying for 'B' entities directly (where the QueryStrategy/MergeStrategy indeed apply), while the second time I tried to retrieved them via navigation properties.</div><div>&nbsp;</div><div>Since it appears that you are trying to retrieve the B entities via NavigationProperties, here are a few approaches you can try:</div><div>&nbsp;</div><div>- set the IsLoaded property of the EntityReference to false:</div><div>&nbsp;</div><div><em>EntityTypeA.PropertyMetadata.NavigationToB.GetEntityReference(myAEntity).IsLoaded = <span style="color: rgb0, 0, 255;">false</span>;</em></div><div>&nbsp;</div><div>this will work on an per Entity/per Navigation basis.</div><div>&nbsp;</div><div>- set it for all navigation properties at the EntityManager level:</div><div>&nbsp;</div><div><em>mgr.DefaultEntityReferenceStrategy = new EntityReferenceStrategy(EntityReferenceLoadStrategy.Load, MergeStrategy.PreserveChanges);</em></div><div>&nbsp;</div><div>You can also find this information in detail&nbsp;in the <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/navigati&#111;n-properties-data-retrieval" target="_blank">DevForce Resource Center</a>.</div><div>&nbsp;</div><div>Let me know if the issue still persists after trying one of the above.</div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Thu, 26 Apr 2012 10:08:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3407&amp;PID=13433#13433</guid>
  </item> 
  <item>
   <title>Deleted entity not removed from EntityCache :   Hi SilvioThank you for your...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3407&amp;PID=13423#13423</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=551" rel="nofollow">rasmus</a><br /><strong>Subject:</strong> 3407<br /><strong>Posted:</strong> 25-Apr-2012 at 11:28pm<br /><br />Hi Silvio<div>&nbsp;</div><div>Thank you for your reply. But it seems to me that not QueryStrategy or MergeStrategy can solve the problem. The way I see it:</div><div>&nbsp;</div><div>-&nbsp;if two users are using the system and both have loaded the samme entities to the cache</div><div>-&nbsp;user1 adds, updated or deletes entities and commits the changes</div><div>-&nbsp;no matter what&nbsp;QueryStrategy or MergeStrategy&nbsp;is made from user2 in subsequent queries - the user2 will see:</div><div>- The entities added by user1 (which is good)</div><div>- The updates to the entities updated by user1 (which is good)</div><div>- But entities deleted from user1 will never be removed from the cache of user2 not matter what subsequent queries are made (not matter the QueryStrategy og MergeStrategy used). Unless the enitycache of user2 is explicitly cleared and entities reloaded.</div><div>&nbsp;</div><div>Is this a correct observation that deleted entities is a "special" case, and no query made will ever remove entities from a cache, only add or update?</div><div>&nbsp;</div><div>Looking forward to your answer</div><div>&nbsp;</div><div>Best regards,</div><div>&nbsp;</div><div>Rasmus</div>]]>
   </description>
   <pubDate>Wed, 25 Apr 2012 23:28:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3407&amp;PID=13423#13423</guid>
  </item> 
  <item>
   <title>Deleted entity not removed from EntityCache :   Hi Rasmus,From the DevForce...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3407&amp;PID=13419#13419</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> 3407<br /><strong>Posted:</strong> 25-Apr-2012 at 4:10pm<br /><br />Hi Rasmus,<div>&nbsp;</div><div>From the DevForce Resource Center:</div><div><em>DevForce uses a MergeStrategy to determine how to reconcile potential conflicts between entities that are being merged into the cache with the entities that are already present in the cache.</em></div><div>&nbsp;</div><div>You will find more details about it in the DevForce Resource Center's&nbsp;<a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/query-strategy" target="_blank">QueryStrategy</a>&nbsp;and <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/query-mergestrategy" target="_blank">MergeStrategy</a> topics.</div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div>]]>
   </description>
   <pubDate>Wed, 25 Apr 2012 16:10:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3407&amp;PID=13419#13419</guid>
  </item> 
  <item>
   <title>Deleted entity not removed from EntityCache :   HiI have a scenario which...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3407&amp;PID=13417#13417</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=551" rel="nofollow">rasmus</a><br /><strong>Subject:</strong> 3407<br /><strong>Posted:</strong> 25-Apr-2012 at 1:31pm<br /><br />Hi<div>&nbsp;</div><div>I have a scenario which looks like this:</div><div>&nbsp;</div><div>Entity A contains a List of Entity B's</div><div>&nbsp;</div><div>Fx.&nbsp;Entity A1 has relations to B1, B2 and B3</div><div>&nbsp;</div><div>Now let us say two users are using the application.</div><div>&nbsp;</div><div>User1 deletes Entity B2</div><div>User1 adds Entity B4</div><div>&nbsp;</div><div>What user1 now sees is Entity A1 having relations to B1, B3 and B4</div><div>&nbsp;</div><div>User2 makes a&nbsp;query the Database for all entities, and user2 now sees the new entity B4, but he also still sees the entity B2 since this entitiy is still in the entitycache. </div><div>&nbsp;</div><div>Hope my example explains my problem. Basically I do not see how the entities cached&nbsp;can ever be deleted from the cache&nbsp;if they are deleted by another user - even if a reload of all the entities are made</div><div>&nbsp;</div><div>How do I work around this problem?</div><div>&nbsp;</div><div>Best regards,</div><div>Rasmus</div>]]>
   </description>
   <pubDate>Wed, 25 Apr 2012 13:31:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3407&amp;PID=13417#13417</guid>
  </item> 
 </channel>
</rss>