From 47a8868be9a9e9e6cb216d36aca9cbf7b1a61db5 Mon Sep 17 00:00:00 2001 From: guiguiboy Date: Thu, 13 Nov 2014 18:10:26 +0100 Subject: [PATCH 1/2] Update doctrine.rst fixed typo --- book/doctrine.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/doctrine.rst b/book/doctrine.rst index 8859cc2a9f4..4a270a20972 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -747,7 +747,7 @@ 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, you can use ``getSingleResult()`` (which throws exception if there is no result) or ``getOneOrNullResult()``:: $product = $query->getOneOrNullResult(); From 39fd2a09c36a1782876a0b92192b947de6679c5a Mon Sep 17 00:00:00 2001 From: guiguiboy Date: Thu, 13 Nov 2014 18:41:01 +0100 Subject: [PATCH 2/2] Update doctrine.rst fixed typo (bis) --- book/doctrine.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/doctrine.rst b/book/doctrine.rst index 4a270a20972..871695ff21d 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -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 if 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();