Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1848

"QueryException: Invalid parameter number: number of bound variables does not match number of tokens" with "dev-master" of Doctrine\ORM + Pagerfanta.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Git Master
    • Fix Version/s: 2.3
    • Component/s: ORM
    • Labels:
      None

      Description

      Using Symfony2 master with Doctrine\ORM master & Pagerfanta paginator (which uses Doctrine paginator internally) causes this exception.

      "QueryException: Invalid parameter number: number of bound variables does not match number of tokens". Works fine with the master of Symfony & same version of Pagerfanta, but with 2.2 of Doctrine ORM.

      Full app to see it is available here: http://github.com/Sylius/Sylius-Sandbox.

      Full trace (without twig and Symfony part)

      [1/2] QueryException: Invalid parameter number: number of bound variables does not match number of tokens
      in /home/pjedrzejewski/Sylius.org/workspace/Sandbox/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php at line 72
      at QueryException ::invalidParameterNumber ()
      in /home/pjedrzejewski/Sylius.org/workspace/Sandbox/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php at line 255
      at Query ->_doExecute ()
      in /home/pjedrzejewski/Sylius.org/workspace/Sandbox/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php at line 737
      at AbstractQuery ->execute (null, '3')
      in /home/pjedrzejewski/Sylius.org/workspace/Sandbox/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php at line 562
      at AbstractQuery ->getScalarResult ()
      in /home/pjedrzejewski/Sylius.org/workspace/Sandbox/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php at line 144
      at Paginator ->count ()
      at count (object(Paginator))
      in /home/pjedrzejewski/Sylius.org/workspace/Sandbox/vendor/pagerfanta/pagerfanta/src/Pagerfanta/Adapter/DoctrineORMAdapter.php at line 75
      at DoctrineORMAdapter ->getNbResults ()
      in /home/pjedrzejewski/Sylius.org/workspace/Sandbox/vendor/pagerfanta/pagerfanta/src/Pagerfanta/Pagerfanta.php at line 167
      at Pagerfanta ->getNbResults ()
      in /home/pjedrzejewski/Sylius.org/workspace/Sandbox/vendor/pagerfanta/pagerfanta/src/Pagerfanta/Pagerfanta.php at line 190
      at Pagerfanta ->haveToPaginate ()

        Activity

        Paweł Jędrzejewski created issue -
        Hide
        Саша Стаменковић added a comment - - edited

        I tested Sylius against this issue with each commit from doctrine master branch, and I find out that bug appeared in this https://github.com/doctrine/doctrine2/commit/1635e0af4b06ef3015205563b59b505ae3fac69d commit.

        Show
        Саша Стаменковић added a comment - - edited I tested Sylius against this issue with each commit from doctrine master branch, and I find out that bug appeared in this https://github.com/doctrine/doctrine2/commit/1635e0af4b06ef3015205563b59b505ae3fac69d commit.
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Workflow jira [ 13744 ] jira-feedback [ 14073 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 14073 ] jira-feedback2 [ 15937 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15937 ] jira-feedback3 [ 18186 ]
        Hide
        Marco Pivetta added a comment -

        Could you check if this isn't the same problem reported at DDC-1803?

        Show
        Marco Pivetta added a comment - Could you check if this isn't the same problem reported at DDC-1803 ?
        Hide
        Benjamin Eberlei added a comment -

        Fixed

        Show
        Benjamin Eberlei added a comment - Fixed
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.3 [ 10185 ]
        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-1848, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Paweł Jędrzejewski
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: