Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-186

addIndex is borken in trunk since this morning update

    Details

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

      Description

      Warning: Illegal offset type in isset or empty in /home/eric/Zend/workspaces/DefaultWorkspace7/fna/lib/Doctrine/DBAL/Schema/Table.php on line 183
      
      Call Stack:
          0.0003     328176   1. {main}() /home/eric/Zend/workspaces/DefaultWorkspace7/fna/application/scripts/tool.php:0
          0.0046     708968   2. Kronos\Common\ToolRunner->run() /home/eric/Zend/workspaces/DefaultWorkspace7/fna/application/scripts/tool.php:31
          0.0094     990020   3. Kronos\Common\Tool->run() /home/eric/Zend/workspaces/DefaultWorkspace7/fna/lib/Kronos/Common/ToolRunner.php:92
          0.0094     990020   4. Kronos\FNA\Tool\CreateDatabase->runTool() /home/eric/Zend/workspaces/DefaultWorkspace7/fna/lib/Kronos/Common/Tool.php:223
          0.0094     990020   5. Kronos\FNA\Tool\CreateDatabase::CreateDatabase() /home/eric/Zend/workspaces/DefaultWorkspace7/fna/application/Kronos/FNA/Tool/CreateDatabase.php:18
          0.7140   10032764   6. Doctrine\ORM\Tools\SchemaTool->createSchema() /home/eric/Zend/workspaces/DefaultWorkspace7/fna/application/Kronos/FNA/Tool/CreateDatabase.php:45
          0.7140   10032764   7. Doctrine\ORM\Tools\SchemaTool->getCreateSchemaSql() /home/eric/Zend/workspaces/DefaultWorkspace7/fna/lib/Doctrine/ORM/Tools/SchemaTool.php:81
          0.7140   10032764   8. Doctrine\ORM\Tools\SchemaTool->getSchemaFromMetadata() /home/eric/Zend/workspaces/DefaultWorkspace7/fna/lib/Doctrine/ORM/Tools/SchemaTool.php:98
          0.7184   10339688   9. Doctrine\DBAL\Schema\Table->addIndex() /home/eric/Zend/workspaces/DefaultWorkspace7/fna/lib/Doctrine/ORM/Tools/SchemaTool.php:197
          0.7184   10339744  10. Doctrine\DBAL\Schema\Table->_createIndex() /home/eric/Zend/workspaces/DefaultWorkspace7/fna/lib/Doctrine/DBAL/Schema/Table.php:150
      
      

        Activity

        Hide
        Eric Durand-Tremblay added a comment -

        Here is the content of columnNames

        Array
        (
            [0] => id
        )
        Array
        (
            [columns] => Array
                (
                    [0] => record_id
                )
        
        )
        
        Show
        Eric Durand-Tremblay added a comment - Here is the content of columnNames Array ( [0] => id ) Array ( [columns] => Array ( [0] => record_id ) )
        Hide
        Eric Durand-Tremblay added a comment -

        After some verification all Mapping Driver generate the index definitions this way

        if ($tableAnnot->indexes !== null) {
                        foreach ($tableAnnot->indexes as $indexAnnot) {
                            $primaryTable['indexes'][$indexAnnot->name] = array('columns' => $indexAnnot->columns);
                        }
                    }
        
        Show
        Eric Durand-Tremblay added a comment - After some verification all Mapping Driver generate the index definitions this way if ($tableAnnot->indexes !== null ) { foreach ($tableAnnot->indexes as $indexAnnot) { $primaryTable['indexes'][$indexAnnot->name] = array('columns' => $indexAnnot->columns); } }
        Hide
        Benjamin Eberlei added a comment -

        Ok, that could be changed easily i guess.

        Show
        Benjamin Eberlei added a comment - Ok, that could be changed easily i guess.
        Hide
        Benjamin Eberlei added a comment -

        Fixed, added a test-case.

        Show
        Benjamin Eberlei added a comment - Fixed, added a test-case.
        Hide
        Eric Durand-Tremblay added a comment -

        Thank you! I confirm this fixed the issue.

        Show
        Eric Durand-Tremblay added a comment - Thank you! I confirm this fixed the issue.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Eric Durand-Tremblay
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: