FOSElasticaBundle icon indicating copy to clipboard operation
FOSElasticaBundle copied to clipboard

Pass a *service* in the persistence repository

Open nayzo opened this issue 6 years ago • 0 comments

Hello,

Actually in the index persistence configuration we can passe a FQCN of the Repository. Is there a way to passe also a service name ?

persistence:
   driver: orm
   model: App\Entity\Foo
   provider: ~
   finder: ~
   repository: App\Repository\FooRepository  OR  app.foo.repository  <=== HERE

The idea behind all this is to possibly pass and inject parameters and services in to the reposiotory class. If it's not the case, I'm willing to make a pull request for this feature.

nayzo avatar Apr 18 '19 08:04 nayzo