[DDC-2268] Lexer error using string functions inside CASE WHEN Created: 02/Feb/13  Updated: 02/Feb/13  Resolved: 02/Feb/13

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

Type: Bug Priority: Major
Reporter: Stefano Assignee: Fabio B. Silva
Resolution: Fixed Votes: 0
Labels: dql
Environment:

Windows 8 64bit, IIS Express 8, PHP 5.4.9



 Description   

When using the CASE WHEN expression in DQL a Lexer error is thrown if the THEN condition uses a FunctionsReturningStrings function. For example, the following query is valid in SQL:

SELECT t.*, CASE WHEN LENGTH(t.myfield) <> 0 THEN CONCAT(t.myfield, t.myfield2) ELSE t.myfield2 END as mycasefield FROM mytable AS t

However, if the CONCAT function is used in DQL the exception is raised.



 Comments   
Comment by Fabio B. Silva [ 02/Feb/13 ]

https://github.com/doctrine/doctrine2/commit/1627fc95965a3e2e3894fcf7e524eb0eaa9d0ddd

Generated at Sun Apr 20 09:08:11 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.