Permalink
Browse files

Adding specific conditions to model->delete's call to dbo->delete. This

helps fix a race condition where dbo->defaultConditions could cause
additional data loss.  Fixes #250
  • Loading branch information...
1 parent bc7770a commit e8678b38acc898f0756fdf8875d6661c3020b87f @markstory markstory committed Nov 9, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 cake/libs/model/model.php
@@ -1831,7 +1831,7 @@ function delete($id = null, $cascade = true) {
));
}
- if ($db->delete($this)) {
+ if ($db->delete($this, array($this->alias . '.' . $this->primaryKey => $id))) {
if (!empty($this->belongsTo)) {
$this->updateCounterCache($keys[$this->alias]);
}

0 comments on commit e8678b3

Please sign in to comment.