Just try *$repo = $em->getRepository('Vendor\MyBundle\Entity\User');*
The EntityManager will resolve the correct EntityRepository for you ;) Marco Pivetta @Ocramius <http://twitter.com/Ocramius> http://marco-pivetta.com On 12 April 2011 17:02, Dmitry Bykadorov <dmitry.bykado...@gmail.com> wrote: > 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? > > -- > 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 > -- 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