public function removeComment(Comment $comment) { $comment->setUser(null); $this->comments->removeElement($comment); return $this; }