Skip to content

Commit e2c522b

Browse files
authored
Merge pull request rails#51016 from javierav/optimistic-locking-doc
Document that lock_version column is integer
2 parents 99d3b52 + a60039b commit e2c522b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/active_record/locking/optimistic.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module Locking
1414
# == Usage
1515
#
1616
# Active Record supports optimistic locking if the +lock_version+ field is present. Each update to the
17-
# record increments the +lock_version+ column and the locking facilities ensure that records instantiated twice
17+
# record increments the integer column +lock_version+ and the locking facilities ensure that records instantiated twice
1818
# will let the last one saved raise a +StaleObjectError+ if the first was also updated. Example:
1919
#
2020
# p1 = Person.find(1)

0 commit comments

Comments
 (0)