Frage

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?

War es hilfreich?

Lösung

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');
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top