What is the difference between Doctrine\Common\Persistence\ObjectManager and Doctrine\ORM\EntityManager when used in a custom type of form?
I can get the repository using both $this->em->getRepository() and $this->om->getRepository() .
class MyFormType extends \Symfony\Component\Form\AbstractType { protected $em; public function __construct(Doctrine\ORM\EntityManager $em) { $this->em = $em; } }
Instead:
class MyFormType extends \Symfony\Component\Form\AbstractType { protected $om; public function __construct(Doctrine\Common\Persistence\ObjectManager $om) { $this->om = $om; } }
symfony doctrine doctrine2 symfony-forms
gremo Apr 23 '12 at 18:01 2012-04-23 18:01
source share