I need to generate all the entities relationship in a database using postgresql. I can generate them using the script below. However, not all tables are generated, only those having SEQUENCES. You'd know tell me how to properly generate all tables, not just those with limited SEQUENCES?
[php]
[...]
$em->getConfiguration()->setMetadataDriverImpl(
new \Doctrine\ORM\Mapping\Driver\DatabaseDriver(
$em->getConnection()->getSchemaManager()
)
);
$cmf = new Doctrine\ORM\Tools\DisconnectedClassMetadataFactory();
$cmf->setEntityManager($em);
$metadata = $cmf->getAllMetadata();
$cme = new \Doctrine\ORM\Tools\Export\ClassMetadataExporter();
$entityGenerator = new \Doctrine\ORM\Tools\EntityGenerator();
$entityGenerator->setAnnotationPrefix("");
$exporter = $cme->getExporter('annotation', __DIR__ . '/entities');
$exporter->setEntityGenerator($entityGenerator);
$exporter->setMetadata($metadata);
$etg = new \Doctrine\ORM\Tools\EntityGenerator;
$exporter->setEntityGenerator($etg);
$exporter->export();