From 78ef07f63031d116384af8e3840069b0f9953015 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 26 Oct 2011 14:12:32 +0300 Subject: [PATCH] Update en/reference/working-with-objects.rst --- en/reference/working-with-objects.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/reference/working-with-objects.rst b/en/reference/working-with-objects.rst index c235828ae..5a9261f6c 100644 --- a/en/reference/working-with-objects.rst +++ b/en/reference/working-with-objects.rst @@ -705,14 +705,14 @@ The ``EntityRepository#findBy()`` method additionally accepts orderings, limit a .. code-block:: php getRepository('MyProject\Domain\User')-findBy(array('age' => 20), array('name' => 'ASC'), 10, 0); + $tenUsers = $em->getRepository('MyProject\Domain\User')->findBy(array('age' => 20), array('name' => 'ASC'), 10, 0); If you pass an array of values Doctrine will convert the query into a WHERE field IN (..) query automatically: .. code-block:: php getRepository('MyProject\Domain\User')-findBy(array('age' => array(20, 30, 40))); + $users = $em->getRepository('MyProject\Domain\User')->findBy(array('age' => array(20, 30, 40))); // translates roughly to: SELECT * FROM users WHERE age IN (20, 30, 40) An EntityRepository also provides a mechanism for more concise