Can I add a condition to CakePHP's update statement?
- by Don Kirkby
Since there doesn't seem to be any support for optimistic locking in CakePHP, I'm taking a stab at building a behaviour that implements it. After a little research into behaviours, I think I could run a query in the beforeSave event to check that the version field hasn't changed.
However, I'd rather implement the check by changing the update…