I want to get the datas that i add with fixture in the other fixture data loader, my problem is that i want to call the $this->getReference("...")
and $this->setReference("...")
in the one load function and that is not permitted so i desided to use from doctrine like this
$em = $this->container->get('doctrine')->getEntityManager('default');
$repository = $em->getRepository('ModelBundle:Post');
$entities = $repository->findAll();
but i got only an empty array! so what is the solution?
Aucun commentaire:
Enregistrer un commentaire