[DDC-2234] WHERE <<custom function>> IS NULL ... doesn't work Created: 11/Jan/13  Updated: 20/Jan/13  Resolved: 20/Jan/13

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: DQL
Affects Version/s: Git Master
Fix Version/s: 2.4
Security Level: All

Type: Bug Priority: Major
Reporter: David Assignee: Fabio B. Silva
Resolution: Fixed Votes: 0
Labels: None


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 :

Generated at Mon Oct 05 00:21:15 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.