Skip to content

Commit

Permalink
Merge pull request #1038 from Greenflex/doc/dql-hidden-keyword
Browse files Browse the repository at this point in the history
Add documentation for the `HIDDEN` keyword in DQL
  • Loading branch information
Ocramius committed Jul 14, 2014
2 parents 90dee70 + b400ad5 commit 5361676
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/en/reference/dql-doctrine-query-language.rst
Expand Up @@ -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');
$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
article-ids:

Expand Down

0 comments on commit 5361676

Please sign in to comment.