public function delete($real_delete, array $where = NULL, $cascade_delete = TRUE, $is_slave_delete = FALSE) { $orm = $this->_orm; $helper_propery = $this->property_helper(); $properties = $helper_propery->get_list(); if (!empty($properties)) { $user_id = 0; if (array_key_exists('deleter_id', $orm->table_columns())) { $user_id = $orm->deleter_id; } $helper_propery->set_owner_id($orm->id); $helper_propery->set_user_id($user_id); foreach ($properties as $_name => $_v) { $helper_propery->remove($_name); } $this->property_cache_clear(); } return parent::delete($real_delete, $where, $cascade_delete, $is_slave_delete); }