﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Alex James commented on More on change tracking...</title><description>Timestamp is a nice thing if you've got it. But lets face it most tables don't have a timestamp or equivalent column. So the only option you have doing updates restricted to rows with ALL of the old values (including the key of course).
  
  
This BTW is how you can do transaction management at the DB level without using locks. Using snapshoting techniques. When the transaction commits it check all previous page data against the live database page and if the same the process the update can continue.
  
  
My personal opinion is that entities should have a sort of data dependence injection going on. They should bind to a sort of uplevel datarow... that tracks current and previous values etc. In this way the entities can remain relatively simple but the updates can be restricted appropriately etc.
</description><link>http://ayende.com/2284/more-on-change-tracking#comment4</link><guid>http://ayende.com/2284/more-on-change-tracking#comment4</guid><pubDate>Tue, 03 Apr 2007 19:41:55 GMT</pubDate></item><item><title>Frans Bouma commented on More on change tracking...</title><description>Oh that's right! :X Didn't think of that... *crawls back into corner* :)
</description><link>http://ayende.com/2284/more-on-change-tracking#comment3</link><guid>http://ayende.com/2284/more-on-change-tracking#comment3</guid><pubDate>Tue, 03 Apr 2007 19:20:21 GMT</pubDate></item><item><title>Ayende Rahien commented on More on change tracking...</title><description>You can get the same functionality by using a trigger, or a simple version column with numeric value, that is incremented from the previous value on save.
  
Having it in the DB is nice, but is not a requirement.
</description><link>http://ayende.com/2284/more-on-change-tracking#comment2</link><guid>http://ayende.com/2284/more-on-change-tracking#comment2</guid><pubDate>Tue, 03 Apr 2007 18:44:56 GMT</pubDate></item><item><title>Frans Bouma commented on More on change tracking...</title><description>Keep in mind that Sqlserver is the only db (ok sybase as well I think) which has a timestamp type which is controlled by the DB system. If that's not done, you need original values to perform any form of concurrency control. I pulled that into the discussion as it belongs to the complete picture, which is what the framework user is faced with anyway. 
</description><link>http://ayende.com/2284/more-on-change-tracking#comment1</link><guid>http://ayende.com/2284/more-on-change-tracking#comment1</guid><pubDate>Tue, 03 Apr 2007 18:42:31 GMT</pubDate></item></channel></rss>