문제

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?

도움이 되었습니까?

해결책

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');
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top