Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-548

Code example for reverse engineering no longer functions

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA1
    • Fix Version/s: 2.0-BETA2
    • Component/s: Documentation
    • Security Level: All
    • Labels:
      None

      Description

      addMappingSource() function no longer exists in \Doctrine\ORM\Tools\Export\ClassMetaDataExporter

      This causes the example code at http://www.doctrine-project.org/documentation/manual/2_0/en/tools#reverse-engineering to break;

      Example code should probably be:

      $em->getConfiguration()->setMetadataDriverImpl(
          new \Doctrine\ORM\Mapping\Driver\DatabaseDriver(
              $em->getConnection()->getSchemaManager()
          )
      );
      
      $cmf = new \Doctrine\ORM\Tools\DisconnectedClassMetadataFactory($em);
      $metadata = $cmf->getAllMetadata();
      
      $cme = new \Doctrine\ORM\Tools\Export\ClassMetadataExporter();
      $exporter = $cme->getExporter('yml', '/path/to/export/yml');
      $exporter->setMetadata($metadata);
      $exporter->export();
      
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Marc Hodgins
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: