Hey guys, I''ve made good progress on the optimistic locking mixin I mentioned earlier. The examples below are all ''working''. I say ''working'' because while the updates fail, there''s currently no kind of error condition returned by the adapters when the updates fail. What''s required is a return value from connection.update, ideally the number of affected rows. Failling that, some kind of ''failed'' code when the update doesn''t do anything. Without this kind of information, I can''t see how I can raise a StaleObjectError. So, I''ve created a ticket (341) requesting this feature. I''m unfamiliar with the connections and the adapters, so I''d appreciate it if someone else could implement this functionality, or something like it. http://dev.rubyonrails.org/trac.cgi/ticket/341 In the mean time, I''ll get to work on ''value'' locking, i.e update ... where id = 1 and attr_one=''old_value'' ...... def some_action p1 = Person.find(1) p2 = Person.find(1) p1.first_name = "Michael" p1.save #UPDATE works p2.first_name = "Michael2" p2.save # UPDATE ''fails'' end class Person < ActiveRecord::Base include ActiveRecord::Locking lock_by :version # default column is ''version_number'' end class Person < ActiveRecord::Base include ActiveRecord::Locking lock_by :version, :column=>"some_column" end class Person < ActiveRecord::Base include ActiveRecord::Locking lock_by :date # default column is ''last_modified'' end class Person < ActiveRecord::Base include ActiveRecord::Locking lock_by :date => :column=>"some_column end -- Cheers Koz