public function delete() { foreach ($this->getComments() as $comment) { $comment->delete(); } parent::delete(); }