Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2213

Paginator does not work with composite primary key entity

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.1
    • Fix Version/s: None
    • Component/s: ORM, Tools
    • Security Level: All
    • Environment:
      php 5.4

      Description

      Paginator does not work with composed primary key.

      "Single id is not allowed on composite primary key in entity" exception is thrown here
      https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php#L90

      Only first column values are fetched while retrieving primary keys here
      https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/Paginator.php#L173

        Activity

        Stanislav Anisimov created issue -
        Stanislav Anisimov made changes -
        Field Original Value New Value
        Description Paginator does not work with composed primary key, because only first column values are fetched while retrieving primary keys here
        https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/Paginator.php#L173
        Paginator does not work with composed primary key.

        "Single id is not allowed on composite primary key in entity" exception is thrown here
        https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php#L90

        Only first column values are fetched while retrieving primary keys here
        https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/Paginator.php#L173
        Marco Pivetta made changes -
        Issue Type Bug [ 1 ] New Feature [ 2 ]
        Priority Critical [ 2 ] Major [ 3 ]
        Austin Morris made changes -
        Description Paginator does not work with composed primary key.

        "Single id is not allowed on composite primary key in entity" exception is thrown here
        https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php#L90

        Only first column values are fetched while retrieving primary keys here
        https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/Paginator.php#L173
        Paginator does not work with composed primary key.

        "Single id is not allowed on composite primary key in entity" exception is thrown here
        https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php#L90

        Only first column values are fetched while retrieving primary keys here
        https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Pagination/Paginator.php#L173

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Stanislav Anisimov
          • Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated: