Update guides/source/active_record_querying.md

Add info about updating locking column value

Follow #26050 and #26871

[ci skip]
This commit is contained in:
bogdanvlviv 2016-11-10 20:42:23 +02:00
parent cd9d6bed1b
commit 25eed41c49
1 changed files with 3 additions and 0 deletions

View File

@ -953,6 +953,9 @@ class Client < ApplicationRecord
end
```
NOTE: Please note that the optimistic locking will be ignored if you update the
locking column's value.
### Pessimistic Locking
Pessimistic locking uses a locking mechanism provided by the underlying database. Using `lock` when building a relation obtains an exclusive lock on the selected rows. Relations using `lock` are usually wrapped inside a transaction for preventing deadlock conditions.