DDC-3903: Possibility to add like clause after arithmetic expression #4775

Open
opened 2026-01-22 14:49:08 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 15, 2015).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user raziel057:

I would like to be able to add a clause like this:

$queryBuilder
->orWhere($queryBuilder->expr()->quot('op.foo', 100).' LIKE :number')
->setParameter('number', $number.'%');

But I got this error: [Syntax Error] line 0, col 227: Error: Expected =, <, <=, <>, >, >=, !=, got 'LIKE'

However the generated SQL is perfectly valid:

SELECT ...
FROM order_payment o0_
WHERE o0_.foo / 100 LIKE '1.2%';

Is it possible to add LIKE as supported operator?

Originally created by @doctrinebot on GitHub (Sep 15, 2015). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user raziel057: I would like to be able to add a clause like this: $queryBuilder ->orWhere($queryBuilder->expr()->quot('op.foo', 100).' LIKE :number') ->setParameter('number', $number.'%'); But I got this error: [Syntax Error] line 0, col 227: Error: Expected =, <, <=, <>, >, >=, !=, got 'LIKE' However the generated SQL is perfectly valid: SELECT ... FROM order_payment o0_ WHERE o0_.foo / 100 LIKE '1.2%'; Is it possible to add LIKE as supported operator?
admin added the New Feature label 2026-01-22 14:49:08 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4775