Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.5
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      Following this cookbook article
      http://symfony.com/doc/2.0/cookbook/doctrine/reverse_engineering.html

      When I run the command, I get an error:

      php app/console doctrine:mapping:convert xml ./src/Acme/BlogBundle/Resources/config/doctrine/metada/orm --from-database --force
      PHP Notice: Undefined variable: otherFk in /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php on line 205
      PHP Stack trace:
      PHP 1. {main}() /var/www/sn/app/console:0
      PHP 2. Symfony\Component\Console\Application->run() /var/www/sn/app/console:16
      PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:119
      PHP 4. Symfony\Component\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:77
      PHP 5. Symfony\Component\Console\Command\Command->run() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:193
      PHP 6. Symfony\Bundle\DoctrineBundle\Command\ConvertMappingDoctrineCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:188
      PHP 7. Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Command/ConvertMappingDoctrineCommand.php:48
      PHP 8. Doctrine\ORM\Mapping\ClassMetadataFactory->getAllMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php:119
      PHP 9. Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:123
      PHP 10. Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:176
      PHP 11. Doctrine\ORM\Mapping\Driver\DatabaseDriver->loadMetadataForClass() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:282
      
      Notice: Undefined variable: otherFk in /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php on line 205
      
      Call Stack:
      0.0036 328024 1. {main}() /var/www/sn/app/console:0
      5.6943 13982540 2. Symfony\Component\Console\Application->run() /var/www/sn/app/console:16
      5.7041 14171544 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:119
      5.7043 14171544 4. Symfony\Component\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:77
      5.7105 14171588 5. Symfony\Component\Console\Command\Command->run() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:193
      5.7140 14172700 6. Symfony\Bundle\DoctrineBundle\Command\ConvertMappingDoctrineCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:188
      5.7980 16246052 7. Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Command/ConvertMappingDoctrineCommand.php:48
      5.8131 16613668 8. Doctrine\ORM\Mapping\ClassMetadataFactory->getAllMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php:119
      7.9402 18186692 9. Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:123
      7.9402 18186692 10. Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:176
      7.9489 18458388 11. Doctrine\ORM\Mapping\Driver\DatabaseDriver->loadMetadataForClass() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:282
      
      PHP Fatal error: Call to a member function getColumns() on a non-object in /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php on line 205
      PHP Stack trace:
      PHP 1. {main}() /var/www/sn/app/console:0
      PHP 2. Symfony\Component\Console\Application->run() /var/www/sn/app/console:16
      PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:119
      PHP 4. Symfony\Component\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:77
      PHP 5. Symfony\Component\Console\Command\Command->run() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:193
      PHP 6. Symfony\Bundle\DoctrineBundle\Command\ConvertMappingDoctrineCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:188
      PHP 7. Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Command/ConvertMappingDoctrineCommand.php:48
      PHP 8. Doctrine\ORM\Mapping\ClassMetadataFactory->getAllMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php:119
      PHP 9. Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:123
      PHP 10. Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:176
      PHP 11. Doctrine\ORM\Mapping\Driver\DatabaseDriver->loadMetadataForClass() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:282
      
      Fatal error: Call to a member function getColumns() on a non-object in /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php on line 205
      
      Call Stack:
      0.0036 328024 1. {main}() /var/www/sn/app/console:0
      5.6943 13982540 2. Symfony\Component\Console\Application->run() /var/www/sn/app/console:16
      5.7041 14171544 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:119
      5.7043 14171544 4. Symfony\Component\Console\Application->doRun() /var/www/sn/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:77
      5.7105 14171588 5. Symfony\Component\Console\Command\Command->run() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Application.php:193
      5.7140 14172700 6. Symfony\Bundle\DoctrineBundle\Command\ConvertMappingDoctrineCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:188
      5.7980 16246052 7. Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand->execute() /var/www/sn/vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Command/ConvertMappingDoctrineCommand.php:48
      5.8131 16613668 8. Doctrine\ORM\Mapping\ClassMetadataFactory->getAllMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php:119
      7.9402 18186692 9. Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:123
      7.9402 18186692 10. Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:176
      7.9489 18458388 11. Doctrine\ORM\Mapping\Driver\DatabaseDriver->loadMetadataForClass() /var/www/sn/vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:282
      

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Fixed

        Show
        Benjamin Eberlei added a comment - Fixed

          People

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

            Dates

            • Created:
              Updated:
              Resolved: