Take the 2-minute tour ×

So I want to generate entities for specific tables in a database that has a huge amount of tables.

Here is the command I'm trying:

php app/console doctrine:mapping:convert yml ./src/MyNamespace/Bundle/MyNamespaceBundle/Resources/config/doctrine/metadata/orm --from-database --em=my_manager --filter=TblReports --verbose

Here is the error:

  Unknown database type unknown requested, Doctrine\DBAL\Platforms\PostgreSqlPlatform may not support it. 

Now I can run this command on a smaller database with only a few tables and it works fine, so it has to be the database.

Yes I want to filter this one table:


If I remove the filter it generates entities for the entire database, which is what I don't want.

I'm running PostgreSQL 8.4 and 9.1 if that matters.

Anyone else have or know how to fix this issue?

Unknown database type unknown requested

Doctrine Docs


UPDATE: Adding my_manager ( config.yml )

# Doctrine Configuration
      default_connection: my_database
          driver:   pdo_pgsql
          port:     5432
          dbname:   tbl_reports
          user:     foo_user
          password: foo_pass
          charset:  UTF8
            bit: string

        auto_generate_proxy_classes: "%kernel.debug%"
        default_entity_manager: my_manager
                connection: my_database
                      mapping: true
                      dir: Entity/Reports

in config_dev.yml ( I use the dev and prod yml files to control the host(s) I can connect to )

# Doctrine Configuration
share|improve this question
Show your my_manager configuration, please –  Ziumin Dec 5 '12 at 20:48
@Ziumin I have added my_manager as requested –  Phill Pafford Dec 5 '12 at 20:57
It seems that there is some non-doctrine postgres type is already used in your database. Try to find it and add it as a custom doctrine type. –  Ziumin Dec 5 '12 at 21:04
add comment

1 Answer

up vote 2 down vote accepted

I agree with Ziumin that it's likely an issue with the data type in your Postgres database. Possibly an Enum or similar.

What I would do is try to convert the tables one by one until you narrow it down to the problem table, and then look at the data types and it should be fairly obvious.

share|improve this answer
There is only one table --filter=TblReports. So just search for non-standart doctrine types like uuid or cidr –  Ziumin Dec 5 '12 at 21:29
ugh... so many tables! BTW the filter option pulls or scans all tables in that database first, then filters to the table you have as the option. So the table itself is not the problem, it's the related tables in the database that's causing the issue. –  Phill Pafford Dec 5 '12 at 22:29
add comment

Your Answer


