Skip to content

Commit

Permalink
Merge pull request #915 from mnapoli/patch-1
Browse files Browse the repository at this point in the history
Improved DQL's "new" operator documentation
  • Loading branch information
FabioBatSilva committed Jan 25, 2014
2 parents bba5ec2 + 30c3eb0 commit 9b7e949
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/en/reference/dql-doctrine-query-language.rst
Expand Up @@ -509,6 +509,8 @@ And then use the ``NEW`` DQL keyword :
$query = $em->createQuery('SELECT NEW CustomerDTO(c.name, e.email, a.city, SUM(o.value)) FROM Customer c JOIN c.email e JOIN c.address a JOIN c.orders o GROUP BY c');
$users = $query->getResult(); // array of CustomerDTO
Note that you can only pass scalar expressions to the constructor.

Using INDEX BY
~~~~~~~~~~~~~~

Expand Down

0 comments on commit 9b7e949

Please sign in to comment.