<?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 : Restore Cache bug</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Restore Cache bug</description>
  <pubDate>Sat, 11 Apr 2026 23:06:27 -700</pubDate>
  <lastBuildDate>Tue, 14 Dec 2010 21:34:49 -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=2373</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>Restore Cache bug : Thanks for the response, Kim....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2373&amp;PID=9406#9406</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2373<br /><strong>Posted:</strong> 14-Dec-2010 at 9:34pm<br /><br />Thanks for the response, Kim. The workaround seems to work well enough, so it's not a big deal.&nbsp;]]>
   </description>
   <pubDate>Tue, 14 Dec 2010 21:34:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2373&amp;PID=9406#9406</guid>
  </item> 
  <item>
   <title>Restore Cache bug : Thanks for describing the problem...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2373&amp;PID=9405#9405</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> 2373<br /><strong>Posted:</strong> 14-Dec-2010 at 7:31pm<br /><br />Thanks for describing the problem and your workaround.&nbsp;&nbsp; The problem occurs because the EntityCacheState is serialized and deserialized using the DataContractSerializer, which is very strict about type definitions and "known" types.&nbsp; The ECS is essentially a serializable list of entities and some state, including any temporary IDs.&nbsp; Because the ECS has special handling for temporary IDs it also includes&nbsp;the IdGenerator in its serialized state.&nbsp;&nbsp; You can see this if you save the ECS in text format - there's more there than just simple entity definitions.<DIV>&nbsp;</DIV><DIV>We may look into&nbsp;some sort of lightweight ECS for those use cases when an IdGenerator isn't ever wanted, but for now this is more of a known, and&nbsp;sometimes irritating, situation and not a bug we can easily fix.&nbsp; If you only need serialized entities, and can attach or add them to an EM manually, then you can also serialize a List&lt;Entity&gt; using the SerializationFns, and not go through the CacheStateManager/EntityCacheState.</DIV>]]>
   </description>
   <pubDate>Tue, 14 Dec 2010 19:31:25 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2373&amp;PID=9405#9405</guid>
  </item> 
  <item>
   <title>Restore Cache bug : Hi,DevForce fails to restore an...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2373&amp;PID=9398#9398</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2373<br /><strong>Posted:</strong> 14-Dec-2010 at 10:34am<br /><br />Hi,<br><br>DevForce fails to restore an entity set restored into Silverlight from a desktop model containing an IdGenerator.<br><br>Additional information: Element 'http://ideablade.com/EntityModel:NextIdGenerator' contains data of the 'http://schemas.datacontract.org/2004/07/Northwind.Model:NumericIdGenerator' data contract. The deserializer has no knowledge of any type that maps to this contract. Add the type corresponding to 'NumericIdGenerator' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.<br><br><br>The solution to this is to create a dummy generator in Silverlight:<br><br>&nbsp;&nbsp;&nbsp; &#091;DataContract&#093;<br>&nbsp;&nbsp;&nbsp; public class NumericIdGenerator1 : IIdGenerator<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public bool IsApplicable(IDataSourceKey dataSourceKey)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public object GetNextTempId(DataEntityProperty property)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return null;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public bool IsTempId(UniqueId uniqueId)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void Reset()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public UniqueIdMap GetRealIdMap(UniqueIdCollection tempIds, IDataSourceKey dataSourceKey)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return null;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public UniqueIdCollection TempIds<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get { return null; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>]]>
   </description>
   <pubDate>Tue, 14 Dec 2010 10:34:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2373&amp;PID=9398#9398</guid>
  </item> 
 </channel>
</rss>