lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php
private function buildTable(Mapping\ClassMetadata $metadata)
    {
        $tableName     = $this->classToTableNames[$metadata->getClassName()];
        $indexes       = $this->tables[$tableName]->getIndexes();
        $tableMetadata = new Mapping\TableMetadata();

        $tableMetadata->setName($this->classToTableNames[$metadata->getClassName()]);

        foreach ($indexes as $index) {
            /** @var Index $index */
            if ($index->isPrimary()) {
                continue;
            }

            $tableMetadata->addIndex([
                'name'    => $index->getName(),
                'columns' => $index->getColumns(),
                'unique'  => $index->isUnique(),
                'options' => $index->getOptions(),
                'flags'   => $index->getFlags(),
            ]);
        }

        $metadata->setTable($tableMetadata);
    }
private function buildTable(Mapping\ClassMetadata $metadata)
    {
        $tableName     = $this->classToTableNames[$metadata->getClassName()];
        $indexes       = $this->tables[$tableName]->getIndexes();
        $tableMetadata = new Mapping\TableMetadata();

        $tableMetadata->setName($this->classToTableNames[$metadata->getClassName()]);

        foreach ($indexes as $index) {
            /** @var Index $index */
            if ($index->isPrimary()) {
                continue;
            }

            $tableMetadata->addIndex([
                'name'    => $index->getName(),
                'columns' => $index->getColumns(),
                'unique'  => $index->isUnique(),
                'options' => $index->getOptions(),
                'flags'   => $index->getFlags(),
            ]);
        }

        $metadata->setTable($tableMetadata);
    }
private function buildTable ( Mapping \ ClassMetadata $ metadata ) { $ tableName = $ this -> classToTableNames [ $ metadata -> getClassName ( ) ] ; $ indexes = $ this -> tables [ $ tableName ] -> getIndexes ( ) ; $ tableMetadata = new Mapping \ TableMetadata ( ) ; $ tableMetadata -> setName ( $ this -> classToTableNames [ $ metadata -> getClassName ( ) ] ) ; foreach ( $ indexes as $ index ) { /** @var Index $index */ if ( $ index -> isPrimary ( ) ) { continue ; } $ tableMetadata -> addIndex ( [ 'name' => $ index -> getName ( ) , 'columns' => $ index -> getColumns ( ) , 'unique' => $ index -> isUnique ( ) , 'options' => $ index -> getOptions ( ) , 'flags' => $ index -> getFlags ( ) , ] ) ; } $ metadata -> setTable ( $ tableMetadata ) ; }
Build table from a class metadata.
Build table from a class metadata .