Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-91

Oracle, Pgsql and Sqlite SchemaManager::listTableIndexes() currently can't return corresponding columns

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-ALPHA2
    • Fix Version/s: 2.0-ALPHA3
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      Currently only the Mysql Platform can return the corresponding columns of an index, the others only return index-name and a boolean isUnique.

      The Mysql platform also returns the data in an unaggregated way, that means an index "Foo" with two columns "bar", "baz" is returned as.

      row 1 Foo bar
      row 2 Foo baz
      

      It is possible to retrieve the column names of indexes, for example ezcDatabaseSchema does it perfectly easy.

      I propose to change the API of SchemaManager::listTableIndexes() to the following:

      array(
          array('name' => 'Foo', 'unique' => false, 'columns' => array('bar', 'baz'),
          array('name' => 'Bar', 'unique' => true, 'columns' => array('foo', 'baz'),
      );
      

      This might be related to Import/Export Schema of Doctrine 1.x, how are indexes handled in this version?

      This issue is related to DDC-90, which can't be implemented without proper index column support..

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Fixed for all platforms.

        Show
        Benjamin Eberlei added a comment - Fixed for all platforms.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: