I'm using following solution now: $userRepo = $em->getRepository('VendorMyBundle:User');
Namespace doesn't working. On 14 апр, 04:56, Christophe COEVOET <s...@notk.org> wrote: > Le 12/04/2011 17:02, Dmitry Bykadorov a crit : > > > > > > > > > Hello! I have YAML entity description: > > > Vendor\MyBundle\Entity\User: > > type: entity > > table: user > > ... > > repositoryClass: Vendor\MyBundle\Repository\UserRepository > > > And i have generated entity with console tool. Great. > > > In controller: > > > $em = $this->get('doctrine.orm.entity_manager'); > > $repo = $em->getRepository('Vendor\MyBundle\Repository > > \UserRepository'); > > > Looks fine but i'm get an exception: > > > "Class Vendor\MyBundle\Repository\UserRepository is not a valid entity > > or mapped super class." > > > What i'm doing wrong? > > the argument passed to the method is wrong. It should be the entity: > $em->getRepository('Entity\Classs\Name') > > -- > Christophe | Stof -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en