I lately made the decision to test Doctrine 2. I have the ability to partly integrate it to Zend. The command line works and that i have the ability to interrogate the database. The issue has the generation of my differents organizations, proxies,...

Before, with Doctrine 1.x, we're able to generate, begin with our database, the YML files and business classes.

Now, with Doctrine 2, we must generate organizations from mapping files(metadata in YML,XML,...). But files can not be produced in the DB with Doctrine 2 (I discovered nothing onto it...).

So, I produced DB YML files with mysql Work bench. However these files aren't compatibles with Doctrine 2.

Fortunately, the doctrine command possess some utility to transform the YML. However i get some other problem : I do not think it is or help onto it!

Maybe someone know Doctrine 2 much better than me and may assist me to? My problem when transforming is :

Could not map doctrine 1 type 'float'!

This is actually the YML part which appear to possess a problem:

  tableName: t_venues
      type: integer(4)
      primary: true
      notnull: true
      autoincrement: true
      type: string(250)
      default: null
      type: clob(65535)
      notnull: true
      type: string(10)
      notnull: true
      type: integer(4)
      notnull: true
      type: string(150)
      notnull: true
      type : float
      default: null
      type : float
      default: null
      fields: [cit_id]
    charset: utf8
    collate: utf8_unicode_ci

I check thas this declaration was standard to Doctrine 1.

Did someone know? Thanks.

For that float problem:

Try decimal instead of float, it maps to some PHP double.

I've implemented new command for producing organizations from database, book https://github.com/umpirsky/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesDbCommand.php

Just add it like:

// DBAL Commands
new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(),
new \Doctrine\DBAL\Tools\Console\Command\ImportCommand(),

// ORM Commands
new \Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand(),
new \Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand(),
new \Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand(),
new \Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand(),
new \Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand(),
new \Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand(),
new \Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand(),
new \Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand(),
new \Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand(),
new \Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand(),
new \Doctrine\ORM\Tools\Console\Command\GenerateEntitiesDbCommand(),
new \Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand(),
new \Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand(),
new \Doctrine\ORM\Tools\Console\Command\RunDqlCommand(),
new \Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand(),