<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 19 11:08:59 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/si/jira.issueviews:issue-xml/DDC-1858/DDC-1858.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DDC-1858] LIKE and IS NULL operators not supported in HAVING clause</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1858</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;The LIKE and IS NULL operators are not supported in HAVING clause.&lt;/p&gt;

&lt;p&gt;Work:&lt;br/&gt;
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)&lt;br/&gt;
SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu = 3&lt;br/&gt;
SELECT _a.id, count(_photos) as uuuu FROM Acme\CoreBundle\Entity\Member _a LEFT JOIN _a.photos _photos GROUP BY _a HAVING uuuu &amp;gt;= 3&lt;br/&gt;
...&lt;/p&gt;

&lt;p&gt;Don&apos;t work:&lt;br/&gt;
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&lt;br/&gt;
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&lt;br/&gt;
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&lt;/p&gt;</description>
                <environment>Win7, Mysql</environment>
            <key id="13760">DDC-1858</key>
            <summary>LIKE and IS NULL operators not supported in HAVING clause</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/inprogress.png">In Progress</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="guilhermeblanco">Guilherme Blanco</assignee>
                                <reporter username="abhoryo">PETIT Yoann</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Jun 2012 20:04:14 +0000</created>
                <updated>Wed, 20 Mar 2013 16:01:11 +0000</updated>
                                    <version>2.2.2</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="18053" author="ocramius" created="Fri, 8 Jun 2012 07:00:39 +0000"  >&lt;p&gt;I think this has already been fixed in latest master and 2.1.7. Could you just give it a try and eventually confirm?&lt;/p&gt;</comment>
                    <comment id="18058" author="abhoryo" created="Fri, 8 Jun 2012 07:22:34 +0000"  >&lt;p&gt;Already try with 2.17, 2.20 and 2.2.2. This hasn&apos;t been fixed.&lt;/p&gt;</comment>
                    <comment id="18157" author="bdiang" created="Wed, 4 Jul 2012 08:07:03 +0000"  >&lt;p&gt;I&apos;m also having this issue (2.2.2). Is there any workaround for this?&lt;/p&gt;

&lt;p&gt;Column aliases also are not supported in HAVING clause:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;$qb-&amp;gt;select(&apos;p&apos;, &apos;COUNT(p.field) as FieldCount&apos;)
            -&amp;gt;from(&apos;Entity&apos;, &apos;p&apos;)
            -&amp;gt;groupBy(&apos;p.id&apos;)
   -&amp;gt;having(&apos;FieldCount IS NULL&apos;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Above code causes error &quot;FieldCount is not pointing to class&quot; and IS NULL causes &quot;Expected =, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, &amp;gt;, &amp;gt;=, !=, got &apos;IS&apos;&quot;&lt;/p&gt;</comment>
                    <comment id="18575" author="beberlei" created="Wed, 29 Aug 2012 12:59:35 +0000"  >&lt;p&gt;Its not a bug as the EBNF says that this is not possible.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=guilhermeblanco&quot; class=&quot;user-hover&quot; rel=&quot;guilhermeblanco&quot;&gt;Guilherme Blanco&lt;/a&gt; Is this something we should support or not?&lt;/p&gt;</comment>
                    <comment id="18576" author="stof" created="Wed, 29 Aug 2012 13:06:17 +0000"  >&lt;p&gt;Another place where it is not supported is in the CASE clause.&lt;/p&gt;

&lt;p&gt;I would vote +1 for supporting it&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>