Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2268

Lexer error using string functions inside CASE WHEN

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.4
    • Component/s: DQL
    • Security Level: All
    • Labels:
    • 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.

        Activity

        Show
        Fabio B. Silva added a comment - https://github.com/doctrine/doctrine2/commit/1627fc95965a3e2e3894fcf7e524eb0eaa9d0ddd

          People

          • Assignee:
            Fabio B. Silva
            Reporter:
            Stefano
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: