Details

    • Type: Documentation Documentation
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Component/s: Documentation
    • Labels:
      None

      Description

      In reference guide, 12: DQL http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html

      12.2.4 DQL SELECT Examples

      With COUNT DISTINCT:

      <?php
      $query = $em->createQuery('SELECT COUNT(DISTINCT u.name) FROM CmsUser');
      $users = $query->getResult(); // array of ForumUser objects

      Alias missing in the query.
      It doesn't return ForumUser objects.

      With Arithmetic Expression in WHERE clause:

      <?php
      $query = $em->createQuery('SELECT u FROM CmsUser u WHERE ((u.id + 5000) * u.id + 3) < 10000000');
      $users = $query->getResult(); // array of ForumUser objects

      It doesn't return ForumUser objects.

      And after these examples the comments on $query->getResult(); that tells what is returned is missing.

        Activity

        Hide
        Hakan Deryal added a comment -

        Added more errors.

        Show
        Hakan Deryal added a comment - Added more errors.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Hakan Deryal
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: