DDC-2234: WHERE <<custom function>> IS NULL ... doesn't work #2810

Closed
opened 2026-01-22 14:04:24 +01:00 by admin · 1 comment
Owner

Originally created by @doctrinebot on GitHub (Jan 11, 2013).

Jira issue originally created by user david_mattei:

I want to run this query :

SELECT ifnull(a.field1, a.field1) as name FROM table a WHERE ifnull(a.field1, a.field1) IS NULL

But I get an doctrine exception :

Doctrine\ORM\Query\QueryException' with message '[Syntax Error] line 0, col 518: Error: Expected Doctrine\ORM\Query\Lexer::T_IS, got '('' in /library/Doctrine/ORM/Query/QueryException.php:52

If I don't use the IS NULL in my where clause it is working perfectly.

I think this issue is related to :
http://www.doctrine-project.org/jira/browse/DDC-1472

Originally created by @doctrinebot on GitHub (Jan 11, 2013). Jira issue originally created by user david_mattei: I want to run this query : SELECT ifnull(a.field1, a.field1) as name FROM table a WHERE ifnull(a.field1, a.field1) IS NULL But I get an doctrine exception : Doctrine\ORM\Query\QueryException' with message '[Syntax Error] line 0, col 518: Error: Expected Doctrine\ORM\Query\Lexer::T_IS, got '('' in /library/Doctrine/ORM/Query/QueryException.php:52 If I don't use the IS NULL in my where clause it is working perfectly. I think this issue is related to : http://www.doctrine-project.org/jira/browse/[DDC-1472](http://www.doctrine-project.org/jira/browse/DDC-1472)
admin added the Bug label 2026-01-22 14:04:24 +01:00
admin closed this issue 2026-01-22 14:04:25 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jan 20, 2013):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Jan 20, 2013): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2810