mirror of https://github.com/rails/rails
Document that lock_version column is integer
This commit is contained in:
parent
1007cc8c03
commit
a60039b8dc
|
@ -14,7 +14,7 @@ module ActiveRecord
|
||||||
# == Usage
|
# == Usage
|
||||||
#
|
#
|
||||||
# Active Record supports optimistic locking if the +lock_version+ field is present. Each update to the
|
# Active Record supports optimistic locking if the +lock_version+ field is present. Each update to the
|
||||||
# record increments the +lock_version+ column and the locking facilities ensure that records instantiated twice
|
# record increments the integer column +lock_version+ and the locking facilities ensure that records instantiated twice
|
||||||
# will let the last one saved raise a +StaleObjectError+ if the first was also updated. Example:
|
# will let the last one saved raise a +StaleObjectError+ if the first was also updated. Example:
|
||||||
#
|
#
|
||||||
# p1 = Person.find(1)
|
# p1 = Person.find(1)
|
||||||
|
|
Loading…
Reference in New Issue