[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 Mon Aug 31 13:58:34 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.