Merge pull request #51 from asm89/patch-1
Fix typos in 'Working with objects' php examples
This commit is contained in:
commit
0317f43987
@ -705,14 +705,14 @@ The ``EntityRepository#findBy()`` method additionally accepts orderings, limit a
|
|||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$tenUsers = $em->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:
|
If you pass an array of values Doctrine will convert the query into a WHERE field IN (..) query automatically:
|
||||||
|
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$users = $em->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)
|
// translates roughly to: SELECT * FROM users WHERE age IN (20, 30, 40)
|
||||||
|
|
||||||
An EntityRepository also provides a mechanism for more concise
|
An EntityRepository also provides a mechanism for more concise
|
||||||
|
Loading…
x
Reference in New Issue
Block a user