HAVING clause with variable and *, / math operators #5598

Closed
wants to merge 1 commit into
from

Projects

None yet

4 participants

@Jean85
Contributor
Jean85 commented Jan 8, 2016

This is integrated and completed in #5599

I've produced a test for bug #4764

As this regression highlights, this bug happens only with the * and / math operators used in the HAVING clause with variables from the SELECT clause; + and - math operators are fine.

Input DQL:

SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1  / countName > 0

Expected:

SELECT COUNT(c0_.name) AS sclr_0 FROM cms_users c0_ HAVING 1 / sclr_0 > 0

Instead:

SELECT COUNT(c0_.name) AS sclr_0 FROM cms_users c0_ HAVING 1 / countName > 0
@Jean85 Jean85 Regression test: HAVING clause does not translate variable name when …
…used with * and / math operators
d7e7baf
@deeky666 deeky666 changed the title from [WIP][Regression] HAVING clause with variable and *, / math operators to HAVING clause with variable and *, / math operators Jan 8, 2016
@Jean85
Contributor
Jean85 commented Jan 14, 2016

Superseeded by #5598
Closing this, thanks @zeroedin-bill

@Jean85 Jean85 closed this Jan 14, 2016
@Ocramius Ocramius added the Duplicate label Jan 16, 2016
@Ocramius
Member

Linking #5599

@Ocramius Ocramius added this to the 2.5.5 milestone Jan 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment