Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1815

using aliases from select clause in having clause does not work

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Component/s: DQL
    • Security Level: All
    • Labels:
      None

      Description

      I have the following DQL:

      SELECT e, count(s) AS shiftsTooLate FROM RAI\ShifterBundle\Entity\Worker e INNER JOIN e.person person LEFT JOIN e.shifts s 
      WITH s.reasonTooLate IS NOT NULL LEFT JOIN e.person a96582 LEFT JOIN e.person a31040 LEFT JOIN e.person a49970 
      LEFT JOIN e.pools a30107 LEFT JOIN e.person a12776 LEFT JOIN a12776.qualifications a78193 LEFT JOIN e.person a38925 
      WHERE (e.blacklist = :f0) AND (e.haccpInstruction = :f1) AND (e.introductoryMaterial = :f2) GROUP BY e.id HAVING (shiftsTooLate = :f3) 
      ORDER BY e.id ASC
      

      When I try to execute this query, I get an undefined index error:

      https://gist.github.com/139220fe4ef7097d05d5

        Activity

        Bart van den Burg created issue -
        Hide
        Benjamin Eberlei added a comment -

        can you execute the query without being wrapped into KNP Paginator?

        Show
        Benjamin Eberlei added a comment - can you execute the query without being wrapped into KNP Paginator?
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Workflow jira [ 13689 ] jira-feedback [ 14062 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 14062 ] jira-feedback2 [ 15926 ]
        Alexander made changes -
        Status Open [ 1 ] Awaiting Testcase/Feedback [ 10000 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15926 ] jira-feedback3 [ 18208 ]
        made changes -
        Status Awaiting Feedback [ 10000 ] In Progress [ 3 ]
        Hide
        Benjamin Eberlei added a comment -

        No feedback given and executed in context of knp paginator, which probably is the source of the error.

        Show
        Benjamin Eberlei added a comment - No feedback given and executed in context of knp paginator, which probably is the source of the error.
        Benjamin Eberlei made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Cannot Reproduce [ 5 ]

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

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Bart van den Burg
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: