From 8be75b6a81539f12e6d2a91a9b84f2594cc18a76 Mon Sep 17 00:00:00 2001 From: eltharin Date: Sat, 24 Aug 2024 09:48:12 +0200 Subject: [PATCH] second review --- docs/en/reference/dql-doctrine-query-language.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/en/reference/dql-doctrine-query-language.rst b/docs/en/reference/dql-doctrine-query-language.rst index 891ce1bd428..e0b8e666cb0 100644 --- a/docs/en/reference/dql-doctrine-query-language.rst +++ b/docs/en/reference/dql-doctrine-query-language.rst @@ -629,7 +629,7 @@ you can use named arguments or variadic arguments, add ``WithNamedArguments`` to } } -And then you can select the fields you want in the order you want : +And then you can select the fields you want in the order you want, and the ORM will try to match argument names with the selected field names : .. code-block:: php @@ -639,7 +639,7 @@ And then you can select the fields you want in the order you want : // CustomerDTO => {name : 'SMITH', email: null, city: 'London', value: null} -you can also aliases column : +ORM will also look column aliases before columns names : .. code-block:: php @@ -648,7 +648,10 @@ you can also aliases column : $users = $query->getResult(); // array of CustomerDTO // CustomerDTO => {name : 'DOE', email: null, city: null, value: 'New York 10011'} - + +Be careful, if two fields have the same name/alias, second will erase first. +If you put an argument name empty (for functions) or not in constructor argument list, ORM will throw an error. + Using INDEX BY ~~~~~~~~~~~~~~