<?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 : Code First and RowVersion</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Code First and RowVersion</description>
  <pubDate>Wed, 13 May 2026 15:05:21 -700</pubDate>
  <lastBuildDate>Wed, 21 Dec 2011 19:17:12 -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=3164</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>Code First and RowVersion : Hi DenisK,Yes indeed, after I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3164&amp;PID=12299#12299</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1364" rel="nofollow">pcournoyer</a><br /><strong>Subject:</strong> 3164<br /><strong>Posted:</strong> 21-Dec-2011 at 7:17pm<br /><br />Hi DenisK,<div><br></div><div>Yes indeed, after I did my post yesterday I was thinking that this is purely an EF Code First problem since it occurs with EF configuration only.</div><div><br></div><div>Sorry for the noise and thanks for the tip.</div><div><br></div><div>Patrick</div>]]>
   </description>
   <pubDate>Wed, 21 Dec 2011 19:17:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3164&amp;PID=12299#12299</guid>
  </item> 
  <item>
   <title>Code First and RowVersion : Hi pcournoyer,It seems that you...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3164&amp;PID=12295#12295</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> 3164<br /><strong>Posted:</strong> 21-Dec-2011 at 11:17am<br /><br />Hi pcournoyer,<div><br></div><div>It seems that you have multiple questions here so I'm going to try and address them one by one.</div><div><br></div><div><table width="99%"><tr><td class="BBquote"></div><div><div style="text-align: left; : rgb251, 251, 253; ">If I put the RowVersion property in the EntityBase class, I get the following error at run-time:</div><div style="text-align: left; : rgb251, 251, 253; ">"The store generated pattern 'Computed' is not supported for properties that are not of type 'timestamp' &nbsp;or 'rowversion'."</div></div><div style="text-align: left; : rgb251, 251, 253; "></td></tr></table></div><div style="text-align: left; : rgb251, 251, 253; "><br></div><div style="text-align: left; : rgb251, 251, 253; ">This sounds like a pure EF Code First question. Have you tried this scenario without DevForce involved?&nbsp;</div><div style="text-align: left; : rgb251, 251, 253; "><br></div><div style="text-align: left; : rgb251, 251, 253; ">I googled the error and found 2 good links that might help you.</div><div style="text-align: left; : rgb251, 251, 253; "><br></div><div style="text-align: left; : rgb251, 251, 253; ">-&nbsp;<a href="http://social.msdn.microsoft.com/Forums/is/adodotnetentityframework/thread/1d7dd6ac-5485-4b52-b391-0575b31d72f5" target="_blank">http://social.msdn.microsoft.com/Forums/is/adodotnetentityframework/thread/1d7dd6ac-5485-4b52-b391-0575b31d72f5</a></div><div style="text-align: left; : rgb251, 251, 253; ">-&nbsp;<a href="http://stackoverflow.com/questi&#111;ns/5593426/how-to-implement-c&#111;ncurrency-in-ef-code-first-while-using-a-tpt-hierarchy" target="_blank">http://stackoverflow.com/questions/5593426/how-to-implement-concurrency-in-ef-code-first-while-using-a-tpt-hierarchy</a></div><div style="text-align: left; : rgb251, 251, 253; "><br></div><div style="text-align: left; : rgb251, 251, 253; "><table width="99%"><tr><td class="BBquote"></div><div style="text-align: left; : rgb251, 251, 253; ">Also, the Id column is only set as Identity for the EntityBase table. The Id column in the tables for the derived classes is NOT set as Identity</div><div style="text-align: left; : rgb251, 251, 253; "></td></tr></table></div><div style="text-align: left; : rgb251, 251, 253; "><br></div><div style="text-align: left; : rgb251, 251, 253; ">Hmm, I don't quite follow this. If your EntityBase.Id column is set to Identity, how are you setting your DerivedEntity.Id to anything other than Identity? Furthermore, what are you setting it to?</div>]]>
   </description>
   <pubDate>Wed, 21 Dec 2011 11:17:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3164&amp;PID=12295#12295</guid>
  </item> 
  <item>
   <title>Code First and RowVersion : I am currently evaluating DevForce...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3164&amp;PID=12274#12274</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1364" rel="nofollow">pcournoyer</a><br /><strong>Subject:</strong> 3164<br /><strong>Posted:</strong> 19-Dec-2011 at 5:34pm<br /><br /><div>I am currently evaluating DevForce and I seem to have reached a dead end trying to put a RowVersion attribute in a base entity using Code First. Here is my setup:</div><div><ul><li>DevForce 6.1.4 release.</li><li>abstract EntityBase containing various "commons" stuff such as Id, CreationDate, ModificationDate, RowVersion...</li><li>Several entity types derive from it.</li><li>Use fluent mapping to setup TPC - Table Per Concrete Type (calling map.MapInheritedProperties() in the EF EntityTypeConfiguration&lt;&gt; classes for derived entities).</li><li>Silverlight 5 client application .</li><li>Separate model project (class library)</li></ul></div><div><br></div><div>If I put the RowVersion property in the EntityBase class, I get the following error at run-time:</div><div>"The store generated pattern 'Computed' is not supported for properties that are not of type 'timestamp' &nbsp;or 'rowversion'."</div><div>It makes no difference whether I tag the property as a RowVersion either using the &#091;Timestamp&#093; data annotation or using the EF fluent interface.</div><div><br></div><div>If I put the RowVersion in the derived entities, I get a compile time error stating that I cannot add concurrency checks in derived classes.</div><div><br></div><div>Also, the Id column is only set as Identity for the EntityBase table. The Id column in the tables for the derived classes is NOT set as Identity. As a result, the temporary negative Id assigned by the client (e.g. -100) gets stored in the database such that on the second insert I get a key violation exception.</div><div><br></div><div>So I am at a loss here...it seems to me that using a base entity is not that useful unless I am missing a key ingredient...</div>]]>
   </description>
   <pubDate>Mon, 19 Dec 2011 17:34:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3164&amp;PID=12274#12274</guid>
  </item> 
 </channel>
</rss>