1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Merge pull request #5771 from teohhanhui/patch-1

Remove note on findBy not supporting entity
This commit is contained in:
Marco Pivetta 2016-04-12 13:39:55 +02:00
commit 76a5229fac

View File

@ -699,8 +699,6 @@ You can also load by owning side associations through the repository:
$number = $em->find('MyProject\Domain\Phonenumber', 1234);
$user = $em->getRepository('MyProject\Domain\User')->findOneBy(array('phone' => $number->getId()));
Be careful that this only works by passing the ID of the associated entity, not yet by passing the associated entity itself.
The ``EntityRepository#findBy()`` method additionally accepts orderings, limit and offset as second to fourth parameters:
.. code-block:: php