On Thu, 20 Jan 2011 04:27:01 -0800 (PST), Venzon <[email protected]> wrote: > When I use fully qualified class name $this- >>get('doctrine.orm.entity_manager')- >>>getRepository('Application\HelloBundle\Repository\Test') I get error: > Class Application\HelloBundle\Repository\Test is not a valid entity or > mapped super class. > > My repository class looks like this: > > <?php > > namespace Application\HelloBundle\Repository; > > use Doctrine\ORM\EntityRepository; > > /** > * Test > * > * This class was generated by the Doctrine ORM. Add your own custom > * repository methods below. > */ > class Test extends EntityRepository > { > > } > > My annotation in etity class looks like this: > > <?php > namespace Application\HelloBundle\Entity; > > /** > * Test > * > * @orm:Entity(repositoryClass="Application\HelloBundle\Repository > \Test") > * @orm:Table(name="test") > */ > class Test > {
Did you register the HelloBundle in the orm configuration ? If not it is not taken into account by the entity manager. This is explained in the doc: http://docs.symfony-reloaded.org/master/guides/doctrine/orm/overview.html -- 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
