I'm working with Cake 2.1.2
This is my action in the controller:
$this->News->updateAll(
array('News.Unread' => 0),
array('News.Id <=' => $lastNewsId, 'RequestingUserId' => $current['id'])
);
Sometime I've this error and I get 500: [PDOException] SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction
I'm sure that in any scripts there aren't locks. What do I have to fix it?