public function addAttachmentToArticle(Article $article, Attachment $attachment) { $article->addAttachment($attachment); $this->em->flush(); }