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
This commit is contained in:
mark_story 2010-11-08 21:50:45 -05:00
parent bc7770aa83
commit e8678b38ac

View file

@ -1831,7 +1831,7 @@ class Model extends Overloadable {
));
}
if ($db->delete($this)) {
if ($db->delete($this, array($this->alias . '.' . $this->primaryKey => $id))) {
if (!empty($this->belongsTo)) {
$this->updateCounterCache($keys[$this->alias]);
}