setName($name); $manager->persist($product); } $manager->flush(); } }