[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


 Description   

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


Generated at Wed Apr 23 16:12:32 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.