From e98cb4f145426860b0b26b47f633473073c7f665 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Wed, 26 Oct 2011 00:54:06 +0300 Subject: [PATCH] Document AbstractQuery#getOneOrNullResult() --- en/reference/dql-doctrine-query-language.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/en/reference/dql-doctrine-query-language.rst b/en/reference/dql-doctrine-query-language.rst index fb5e7123f..b8540e17b 100644 --- a/en/reference/dql-doctrine-query-language.rst +++ b/en/reference/dql-doctrine-query-language.rst @@ -858,8 +858,10 @@ the Query class. Here they are: result is either a plain collection of objects (pure) or an array where the objects are nested in the result rows (mixed). - ``Query#getSingleResult()``: Retrieves a single object. If the - result contains more than one object, an exception is thrown. The + result contains more than one or no object, an exception is thrown. The pure/mixed distinction does not apply. +- ``Query#getOneOrNullResult()``: Retrieve a single object. If no + object is found null will be returned. - ``Query#getArrayResult()``: Retrieves an array graph (a nested array) that is largely interchangeable with the object graph generated by ``Query#getResult()`` for read-only purposes.