1

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:

[Doctrine\DBAL\DBALException]                                                                            
  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:

--filter=TblReports

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

Releated:

UPDATE: Adding my_manager ( config.yml )

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

    orm:
        auto_generate_proxy_classes: "%kernel.debug%"
        default_entity_manager: my_manager
        entity_managers:
            my_manager:
                connection: my_database
                mappings:
                    MyNamespaceBundle:
                      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
doctrine:
    dbal:
      connections:
        my_database:
          host: 172.0.0.1
Community
  • 1
  • 1
Phill Pafford
  • 83,471
  • 91
  • 263
  • 383

1 Answers1

2

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.

jmather
  • 169
  • 5
  • There is only one table `--filter=TblReports`. So just search for non-standart doctrine types like `uuid` or `cidr` – Ziumin Dec 05 '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 05 '12 at 22:29