public function forceDelete($id = null)
{
if (!empty($id)) {
$this->findOrFail($id);
}
$id = $this->getId();
if (!$id) {
throw new RecordNotLoaded("Can't delete a not loaded DataModel object");
}
$this->triggerEvent('onBeforeDelete', array(&$id));
$db = $this->getDbo();
$query = $db->getQuery(true)->delete()->from($this->tableName)->where($db->qn($this->idFieldName) . ' = ' . $db->q($id));
$db->setQuery($query)->execute();
$this->triggerEvent('onAfterDelete', array(&$id));
$this->reset();
return $this;
}