Pergunta

Most of the time, entities are located at src/Project/FooBundle/Entity/Foo.php. Then you can access the repository by:

$this->getRepository('ProjectFooBundle:Foo');

But how to access the repository when an entity is located at src/Project/FooBundle/Entity/Foo/Foo.php?

Foi útil?

Solução

as mentioned in my comment this can be done by the following syntax:

$this->getRepository('ProjectFooBundle:Foo/Foo');

or (as mentioned by @Touki)

$this->getRepository('ProjectFooBundle:Foo\Foo');
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top