Skip to content

Loading…

DDC-1539: QueryException occurs when parentheses exist on the left-hand of comparison #2172

Closed
doctrinebot opened this Issue · 4 comments

2 participants

@doctrinebot

Jira issue originally created by user miau:

When I executed the following DQL, I get an error.

> php scripts/doctrine.php orm:run-dql "select o from OrderDetail o where (o.price <ins> o.tax) * o.count > 10000"

  [Doctrine\ORM\Query\QueryException]
  [Syntax Error] line 0, col 69: Error: Expected =, <, <=, <>, >, >=, !=, got ')'

When I swap the left-hand expression and right-hand one, no error occurs.

> php scripts/doctrine.php orm:run-dql "select o from OrderDetail o where 10000 < (o.price </ins> o.tax) * o.count"

array
  empty
@doctrinebot

Comment created by @beberlei:

This issue is referenced in Github Pull-Request GH-233
#233

@doctrinebot

Comment created by @guilhermeblanco:

Fixed in 4bc014c

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by @beberlei:

Related Pull Request was closed: #233

@doctrinebot doctrinebot added this to the 2.2 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.