src/Service/TableConnectorGenerator.php
private function loadPrimaryKeyforTable($table, Connection $connection)
    {
        $indexes = $connection->getSchemaManager()->listTableIndexes($table);

        $primaryKey = null;

        foreach ($indexes as $index) {
            if ($index->isPrimary()) {
                $columns = $index->getColumns();

                $primaryKey = implode("_", $columns);
                break;
            }
        }

        return $primaryKey;
    }
private function loadPrimaryKeyforTable($table, Connection $connection)
    {
        $indexes = $connection->getSchemaManager()->listTableIndexes($table);

        $primaryKey = null;

        foreach ($indexes as $index) {
            if ($index->isPrimary()) {
                $columns = $index->getColumns();

                $primaryKey = implode("_", $columns);
                break;
            }
        }

        return $primaryKey;
    }
private function loadPrimaryKeyforTable ( $ table , Connection $ connection ) { $ indexes = $ connection -> getSchemaManager ( ) -> listTableIndexes ( $ table ) ; $ primaryKey = null ; foreach ( $ indexes as $ index ) { if ( $ index -> isPrimary ( ) ) { $ columns = $ index -> getColumns ( ) ; $ primaryKey = implode ( "_" , $ columns ) ; break ; } } return $ primaryKey ; }
If table has a primary key this becomes the identifier of the row type.
If primary key consists of more then one column, the name of the identifier is generated by
concatenating the column names with a underscore.
Such a row type needs to be manually adjusted to deal with the identifier!

@param $table
@param Connection $connection
@return null|string
If table has a primary key this becomes the identifier of the row type . If primary key consists of more then one column the name of the identifier is generated by concatenating the column names with a underscore . Such a row type needs to be manually adjusted to deal with the identifier!