1
0
mirror of synced 2025-01-19 23:11:41 +03:00

Add documentation for the HIDDEN keyword in DQL

This commit is contained in:
Michaël Perrin 2014-05-27 11:43:15 +02:00
parent 20e47ae52d
commit b400ad52cc

View File

@ -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: