Add documentation for the HIDDEN
keyword in DQL
This commit is contained in:
parent
20e47ae52d
commit
b400ad52cc
@ -302,6 +302,14 @@ With Arithmetic Expression in WHERE clause:
|
|||||||
$query = $em->createQuery('SELECT u FROM CmsUser u WHERE ((u.id + 5000) * u.id + 3) < 10000000');
|
$query = $em->createQuery('SELECT u FROM CmsUser u WHERE ((u.id + 5000) * u.id + 3) < 10000000');
|
||||||
$users = $query->getResult(); // array of ForumUser objects
|
$users = $query->getResult(); // array of ForumUser objects
|
||||||
|
|
||||||
|
Retrieve user entities with Arithmetic Expression in ORDER close, using the ``HIDDEN`` keyword:
|
||||||
|
|
||||||
|
.. code-block:: php
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$query = $em->createQuery('SELECT u, u.posts_count + u.likes_count AS HIDDEN score FROM CmsUser u ORDER BY score');
|
||||||
|
$users = $query->getResult(); // array of User objects
|
||||||
|
|
||||||
Using a LEFT JOIN to hydrate all user-ids and optionally associated
|
Using a LEFT JOIN to hydrate all user-ids and optionally associated
|
||||||
article-ids:
|
article-ids:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user