Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2205

Negative Values in Case Then expressions

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.4
    • Component/s: DQL
    • Security Level: All
    • Labels:

      Description

      DQL Expression:

      SELECT (CASE WHEN t.id = 1 THEN -1 ELSE t.id END) FROM Table t

      Gives an error:
      [Syntax Error] line 0, col 32: Error: Unexpected '-'

      It doesn't seem to like the negative number.

        Activity

        Ilya Biryukov created issue -
        Ilya Biryukov made changes -
        Field Original Value New Value
        Description DQL Expression:

        SELECT (CASE WHEN t.id = 1 THEN -1 ELSE t.id END) FROM {$this->getEntityName()} t

        Gives an error:
        [Syntax Error] line 0, col 32: Error: Unexpected '-'

        It doesn't seem to like the negative number.
        DQL Expression:

        SELECT (CASE WHEN t.id = 1 THEN -1 ELSE t.id END) FROM Table t

        Gives an error:
        [Syntax Error] line 0, col 32: Error: Unexpected '-'

        It doesn't seem to like the negative number.
        Fabio B. Silva made changes -
        Assignee Benjamin Eberlei [ beberlei ] Fabio B. Silva [ fabio.bat.silva ]
        Show
        Fabio B. Silva added a comment - Fixed : https://github.com/doctrine/doctrine2/commit/8b5e4a9a52670992b85e7223d255b98cf77a35a3
        Fabio B. Silva made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.4 [ 10321 ]
        Resolution Fixed [ 1 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-2205, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

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

            Dates

            • Created:
              Updated:
              Resolved: