Uploaded image for project: 'Doctrine 1'
  1. Doctrine 1
  2. DC-49

Wrong query parameter order when using limit() on PostgreSQL

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.4
    • Fix Version/s: None
    • Component/s: Query
    • Labels:
      None
    • Environment:
      latest doctrine 1.1 revision, linux x64, PostgeSQL 8.4, php 5.2.10

      Description

      Trying to add limit() to complex query with many where's and some joins. In pgsql it causes nested limit subquery and in some cases parameter order (when limit subquery exists params array just merges with itself, i. e. (1,2) becomes (1,2,1,2)) makes result query wrong, i. e. params array order doesn't correspond placeholders order in query.

      With named query parameters all ok.

      Testcase attached.

      1. Doctrine_Query_Abstract.diff
        0.6 kB
        Daniel Bojdo
      2. PostgresParamsBugTestCase.php
        4 kB
        Nicholas Kasyanov

        Activity

        corristo Nicholas Kasyanov created issue -
        corristo Nicholas Kasyanov made changes -
        Field Original Value New Value
        Priority Critical [ 2 ] Major [ 3 ]
        romanb Roman S. Borschel made changes -
        Assignee Roman S. Borschel [ romanb ] Guilherme Blanco [ guilhermeblanco ]
        dbojdo Daniel Bojdo made changes -
        Attachment Doctrine_Query_Abstract.diff [ 10709 ]

          People

          • Assignee:
            guilhermeblanco Guilherme Blanco
            Reporter:
            corristo Nicholas Kasyanov
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: