mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1857: The Having clause with a DQL function only accepts comparison operators #2342
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Jun 7, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user abhoryo:
The Having clause with a DQL function only accepts comparison operators.
Error: Expected =, <, <=, <>, >, >=, !=, got 'LIKE'
Exemple of query:
SELECT _photos.active, min(_photos.title)
FROM Acme\CoreBundle\Entity\Photo _photos
GROUP BY _photos.active
HAVING min(_photos.title) LIKE 'mountain'
In Parser::SimpleConditionalExpression(), the parser doesn't understand the 'like' expression and see instead a 'min' expression.
If we return $this->LikeExpression() for this case, it works.
Is this a limitation or a bug ?
@doctrinebot commented on GitHub (Jun 8, 2012):
Comment created by @ocramius:
I think this has already been fixed in latest master and 2.1.7. Could you just give it a try and eventually confirm?
@doctrinebot commented on GitHub (Jun 8, 2012):
Comment created by abhoryo:
Already try with 2.17, 2.20 and 2.2.2. This hasn't been fixed.
@doctrinebot commented on GitHub (Jul 4, 2012):
Comment created by @beberlei:
Duplicate of DDC-1858
@doctrinebot commented on GitHub (Jul 4, 2012):
Issue was closed with resolution "Duplicate"