KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
To save entity with doctrine I should do like this $em = $this->getDoctrine()->getEntityManager(); $em->persist($product); $em->flush(); But maybe I can somehow do that in one line like $product->save(); or $this->saveEntity($product); or $this->getDoctrineEntityManager()->persistAndFlush($product); If I need to create this methods by my self then how to do that in symfony way?
Tags (comma-separated)
Save Edits
Cancel