/** * Delete this object and reset all relationship. This function will not delete any of related objec * * @access public * @param void * @return boolean */ function delete() { try { DB::execute("UPDATE " . ProjectMessages::instance()->getTableName(true) . " SET `milestone_id` = '0' WHERE `milestone_id` = " . DB::escape($this->getId())); DB::execute("UPDATE " . ProjectTaskLists::instance()->getTableName(true) . " SET `milestone_id` = '0' WHERE `milestone_id` = " . DB::escape($this->getId())); return parent::delete(); } catch (Exception $e) { throw $e; } // try }
/** * Trash this object and reset all relationship. This function will not trash any of related objects * * @access public * @param void * @return boolean */ function trash($trashDate = null) { try { DB::execute("UPDATE " . ProjectTasks::instance()->getTableName(true) . " SET `milestone_id` = '0' WHERE `milestone_id` = " . DB::escape($this->getId())); return parent::trash($trashDate); } catch (Exception $e) { throw $e; } // try }