public function delete()
{
/**
* Execute pre-DELETE logic
*/
$this->beforeDelete();
$primaryKey = $this->getPrimaryKey();
/**
* Execute the DELETE (this may throw an exception)
*/
$table = $this->getTable();
$result = $table->delete($primaryKey);
/**
* Execute post-DELETE logic
*/
$this->afterDelete();
/**
* Reset all fields to null to indicate that the row is not there
*/
$this->resetArray();
return $result;
}