質問

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