Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1346

Error when referencing aliased sub-select in where clause

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1.3
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      Example:

      $qb->addSelect('(SELECT COUNT(tp2) FROM TeamPlayer tp2 WHERE tp2.team = t) AS test');
      
      $qb->andWhere('test > 3');

      [Semantical Error] line 0, col 186 near 'test > 3 ORDER': Error: 'test' does not point to a Class.

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Assigned to Guilherme

        Show
        Benjamin Eberlei added a comment - Assigned to Guilherme
        Show
        Guilherme Blanco added a comment - Fixed since commit https://github.com/doctrine/doctrine2/commit/6bbf2d9da35aa8ce500f26d671a135a00870e33a
        Hide
        Benjamin Eberlei added a comment -

        Merged into 2.1

        Show
        Benjamin Eberlei added a comment - Merged into 2.1
        Hide
        Benjamin Eberlei added a comment -

        Merged into 2.1.x

        Show
        Benjamin Eberlei added a comment - Merged into 2.1.x

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Glen Ainscow
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: