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;
    }