public function createAction() { $article = new Product(); $article->setTitle('Trophée Descartes 2013'); $article->setPrice('6/7 Arvil'); $article->setContent('Lorem ipsum dolor'); $em = $this->getDoctrine()->getManager(); $em->persist($article); $em->flush(); return new Response('Id du produit créé : ' . $article->getId()); }