删除对象数据
integer Module_OOP_ORM_Data::delete( )
integer
操作行数public function delete()
{
$orm = $this->orm();
$status = 0;
$id_field = $this->get_id_field_name();
if ( $id_field )
{
$where[$id_field] = $this->$id_field;
}
else
{
throw new Exception('ORM:' . get_class($orm) . '不存在ID字段,无法使用ORM系统自带的delete方法删除。');
}
$status = $orm->delete($where);
$this->_remove_id_cache_data();
return $status;
}