From 6995d75dc890d6256914b955d0165d92ff8a6f61 Mon Sep 17 00:00:00 2001 From: Marco Leong Date: Thu, 7 Feb 2013 17:12:38 +0800 Subject: [PATCH] The finder was not created in that section The finder was not created in that section, use repository instead, make more sense for user --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b2cc942..131b1b4 100644 --- a/README.md +++ b/README.md @@ -410,7 +410,7 @@ example: $repository = $repositoryManager->getRepository('UserBundle:User'); /** var array of Acme\UserBundle\Entity\User */ - $users = $finder->find('bob'); + $users = $repository->find('bob'); You can also specify the full name of the entity instead of the shortcut syntax: @@ -431,7 +431,7 @@ to `foq_elastica.manager`. So the above example could be simplified to: $repository = $repositoryManager->getRepository('UserBundle:User'); /** var array of Acme\UserBundle\Entity\User */ - $users = $finder->find('bob'); + $users = $repository->find('bob'); If you use multiple drivers then you can choose which one is aliased to `foq_elastica.manager` using the `default_manager` parameter: @@ -493,7 +493,7 @@ Then the custom queries will be available when using the repository returned fro $repository = $repositoryManager->getRepository('UserBundle:User'); /** var array of Acme\UserBundle\Entity\User */ - $users = $finder->findWithCustomQuery('bob'); + $users = $repository->findWithCustomQuery('bob'); Alternatively you can specify the custom repository using an annotation in the entity: