Changeset 6682
- Timestamp:
- 05/06/07 05:01:31 (2 years ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/locking/optimistic.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r6678 r6682 1 1 *SVN* 2 3 * Provide brief introduction to what optimistic locking is. [fearoffish] 2 4 3 5 * Add documentation for :encoding option to mysql adapter. [marclove] trunk/activerecord/lib/active_record/locking/optimistic.rb
r6396 r6682 1 1 module ActiveRecord 2 2 module Locking 3 # == What is Optimistic Locking 4 # 5 # Optimistic locking allows multiple users to access the same record for edits, and assumes a minimum of 6 # conflicts with the data. It does this by checking whether another process has made changes to a record since 7 # it was opened, an ActiveRecord::StaleObjectError is thrown if that has occurred and the update is ignored. 8 # 9 # Check out ActiveRecord::Locking::Pessimistic for an alternative. 10 # 11 # == Usage 12 # 3 13 # Active Records support optimistic locking if the field <tt>lock_version</tt> is present. Each update to the 4 14 # record increments the lock_version column and the locking facilities ensure that records instantiated twice