added Table::with()
[m6w6/pq-gateway] / lib / pq / Gateway / Table / OptimisticLock.php
index 08e5ae364f687f2e019cc633d83dc7c72542c897..8c2ec7b9741cb52b57e4c6bee3fdf9294726a81b 100644 (file)
@@ -23,11 +23,11 @@ class OptimisticLock implements LockInterface
        }
        
        /**
-        * @implements LockInterface
+        * @inheritdoc
         * @param \pq\Gateway\Row $row
         * @param array $where reference to the criteria
         */
-       function criteria(Row $row, array &$where) {
+       function onUpdate(Row $row, array &$where) {
                $where["{$this->column}="] = $row->getData()[$this->column];
                $row->{$this->column}->mod(+1);
        }