Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1858

LIKE and IS NULL operators not supported in HAVING clause

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.5
    • Component/s: DQL
    • Security Level: All
    • Labels:
      None
    • Environment:
      Win7, Mysql

      Description

      The LIKE and IS NULL operators are not supported in HAVING clause.

      Work:
      SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu in (3,6)
      SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu = 3
      SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu >= 3
      ...

      Don't work:
      SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu LIKE 3
      SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu IS NULL
      SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu IS NOT NULL

        Activity

        PETIT Yoann created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Workflow jira [ 13760 ] jira-feedback [ 14075 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 14075 ] jira-feedback2 [ 15939 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15939 ] jira-feedback3 [ 18188 ]
        Benjamin Eberlei made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Assignee Benjamin Eberlei [ beberlei ] Guilherme Blanco [ guilhermeblanco ]
        Daniel Tangermann made changes -
        Status Open [ 1 ] Awaiting Feedback [ 10000 ]
        made changes -
        Status Awaiting Feedback [ 10000 ] In Progress [ 3 ]
        Guilherme Blanco made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Benjamin Eberlei made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s 2.5 [ 10522 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            PETIT Yoann
          • Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: