<?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 : Related entities count invalid after delete.</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Related entities count invalid after delete.</description>
  <pubDate>Sat, 11 Apr 2026 17:57:26 -700</pubDate>
  <lastBuildDate>Tue, 12 Oct 2010 12:03:58 -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=2221</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>Related entities count invalid after delete. : Hi Ryan;What environment are you...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2221&amp;PID=8768#8768</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> 2221<br /><strong>Posted:</strong> 12-Oct-2010 at 12:03pm<br /><br /><div style=": rgb255, 255, 255; margin-left: 1px; margin-top: 1px; margin-right: 1px; margin-bottom: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; color: rgb0, 0, 0; font-weight: normal; font-size: 12px; line-height: 1.4; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; -: n&#111;ne; ">Hi Ryan;<div><br></div><div>What environment are you in? And what exactly do you mean by refresh?</div><div><br></div><div>I was able to build something similar to the app you described but was not able to reproduce your issue. When I deleted an Order and call SaveChangesAsync from the second screen, it immediately removed the Order from this second screen. When I closed this screen and returned back to the first screen, I did a browser refresh and saw that the deleted Order was removed.</div></div>]]>
   </description>
   <pubDate>Tue, 12 Oct 2010 12:03:58 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2221&amp;PID=8768#8768</guid>
  </item> 
  <item>
   <title>Related entities count invalid after delete. : I have a scenario that does something...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2221&amp;PID=8756#8756</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=838" rel="nofollow">rhaney</a><br /><strong>Subject:</strong> 2221<br /><strong>Posted:</strong> 09-Oct-2010 at 12:56pm<br /><br />I have a scenario that does something like the following:<DIV>&nbsp;</DIV><DIV>1) Launches a read-only screen with a grid&nbsp;that displays a Customer, including related orders via AddIncludePaths("Orders").&nbsp; This screen displays a count of the orders in the grid&nbsp;via customer.Orders.Count(), using&nbsp;a value converter.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>2) Launches a new screen, with a new entity manager, that allows editing of the Customer and related Orders, where orders can be added or removed and changes are saved.</DIV><DIV>&nbsp;</DIV><DIV>3) Refreshes the data on the first screen, once finished with the second.&nbsp; The count of orders, however, is not consistent with the changes.</DIV><DIV>&nbsp;</DIV><DIV>If I start with 2 orders, add 6 and refresh the read only screen, I will get a total of eight orders.&nbsp; If I return to the screen and delete the 6 I just added, and refresh again, the total of 8 remains.</DIV><DIV>&nbsp;</DIV><DIV>Results are the same, even if I change the QueryStrategy on the first screen to DataSourceOnly.</DIV><DIV>&nbsp;</DIV><DIV>If I clear the read only screen's&nbsp;entity manager before the refresh, the count is correct.</DIV><DIV>&nbsp;</DIV><DIV>If I remove the customer and their orders from the read only screen's&nbsp;entity manager and refresh, the count is correct as well.</DIV><DIV>&nbsp;</DIV><DIV>My guess is DELETED entities are not&nbsp;taken into account when refreshing?&nbsp; What would happen if you deleted an order via SQL Mgmt Studio and&nbsp;attempted a refresh?&nbsp; It seems like&nbsp;it would be possible to use the set of orders retrieved from the&nbsp;data source to determine&nbsp;what has been deleted.</DIV><DIV>&nbsp;</DIV><DIV>What are the scenarios where it would be desirable to retain the entities in cache, that were deleted from the source?</DIV><DIV>&nbsp;</DIV><DIV>I'd like to be able to just refresh, bind the datagrid again, and be done.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sat, 09 Oct 2010 12:56:13 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2221&amp;PID=8756#8756</guid>
  </item> 
 </channel>
</rss>