Doctrine Website
  1. Doctrine Website
  2. DWEB-57

Incorrect example for EntityGenerator

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Component/s: Documentation
    • Labels:
      None

      Description

      There is incorrect example in this page
      http://www.doctrine-project.org/api/orm/2.0/doctrine/orm/tools/entitygenerator.html

      Generic class used to generate PHP5 entity classes from ClassMetadataInfo instances
      [php] $classes = $em->getClassMetadataFactory()->getAllMetadata();
      $generator = new \Doctrine\ORM\Tools\EntityGenerator(); $generator->setGenerateAnnotations(true); $generator->setGenerateStubMethods(true); $generator->setRegenerateEntityIfExists(false); $generator->setUpdateEntityIfExists(true); $generator->generate($classes, '/path/to/generate/entities');

      Fatal error: Call to undefined method Doctrine\ORM\EntityManager::getClassMetadataFactory()

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Alexandr Torchenko
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: