class Model extends AppModel{
public function deleteSomething(){
if (empty($this->id)) {
return false;
}
$this->read();
$db =& ConnectionManager::getDataSource($this->useDbConfig);
$db->begin($this);
if (! $this->delete($this->id, true)) {
$db->rollback($this);
return false;
}
return $db->commit($this);
}
由于某种原因,这不会删除??我已经调试了id,它是正确的。有任何想法吗?我错过了什么吗?}