On Thu, 20 Jan 2011 02:39:00 -0800 (PST), Venzon <[email protected]> wrote: > Thank you for answer, I see now where is a difference. > > I have my custom repository for Test entity generated by framework > (using annotations) in /Application/HelloBundle/Repositories/Test.php > When I call it from controller by: $this- >>get('doctrine.orm.entity_manager')->getRepository("Application > \FtravelBundle\Repository\Test") I get error: > Class Application\FtravelBundle\Repository\Test is not a valid entity > or mapped super class. > I used doctrine:generate:repositories to create repositories using > annotations, all went without errors. > > Where am I doing something wrong? > I tried to look for good example of using repositories in > symfony2bundles.org but havent found anything decent. > > Help^^
The getRepositoty method gives you the repository of a given entity. So the argument has to be the entity class name Regards. -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
