Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1472

WHERE <<function>> IN ... doesn't work

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: DQL
    • Security Level: All
    • Labels:
      None

      Description

      I have a query which is supposed to compare a result of a user defined function with a set of possible results
      SELECT ... WHERE YEAR(w.date) IN (.......)

      But I get the error:
      [Syntax Error] line 0, col 49: Error: Expected Doctrine\ORM\Query\Lexer::T_IN, got '('

      If I only compare the result of the function with a single value everything works as aspected:
      SELECT ... WHERE YEAR(w.date) = 2011
      .. works!

      I also testet it with other functions like DATE_DIFF, etc. but always get the same error.

        Activity

        Christoph Krämer created issue -
        Fabio B. Silva made changes -
        Field Original Value New Value
        Assignee Benjamin Eberlei [ beberlei ] Fabio B. Silva [ fabio.bat.silva ]
        Fabio B. Silva made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Show
        Guilherme Blanco added a comment - Fixed in master since this commit: https://github.com/doctrine/doctrine2/commit/0380d5ae580dcbefd63051028fc1ab78599fda6c
        Guilherme Blanco made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Assignee Fabio B. Silva [ fabio.bat.silva ] Guilherme Blanco [ guilhermeblanco ]
        Fix Version/s 2.2-DEV [ 10157 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 13151 ] jira-feedback [ 15099 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 15099 ] jira-feedback2 [ 16963 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 16963 ] jira-feedback3 [ 19216 ]

        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-1472, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Christoph Krämer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: