Skip to content

Commit

Permalink
Update doctrine.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
guiguiboy authored and wouterj committed Nov 14, 2014
1 parent 81fc1c6 commit cb0865d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions book/doctrine.rst
Expand Up @@ -747,8 +747,8 @@ normal ``Query`` object, which can be used to get the result of the query.
(``:price`` in the example above) as it prevents SQL injection attacks.

The ``getResult()`` method returns an array of results. To get only one
result, you can use ``getSingleResult()`` (which throws exception there is no
result) or ``getOneOrNullResult()``::
result, you can use ``getSingleResult()`` (which throws an exception if there
is no result) or ``getOneOrNullResult()``::

$product = $query->getOneOrNullResult();

Expand Down

0 comments on commit cb0865d

Please sign in to comment.