php bin/console doctrine:mapping:import

Imports mapping information from an existing database

Usage

doctrine:mapping:import [--em [EM]] [--shard SHARD] [--filter FILTER] [--force] [--] <bundle> [<mapping-type>]

Arguments

bundle         The bundle to import the mapping information to 
mapping-type   The mapping type to export the imported mapping information to 

Options

      --em       The entity manager to use for this command 
      --shard    The shard connection to use for this command 
      --filter   A string pattern used to match entities that should be mapped. 
      --force    Force to overwrite existing mapping files. 

Help

The doctrine:mapping:import command imports mapping information
from an existing database:

php bin/console doctrine:mapping:import "MyCustomBundle" xml

You can also optionally specify which entity manager to import from with the
--em option:

php bin/console doctrine:mapping:import "MyCustomBundle" xml --em=default

If you don't want to map every entity that can be found in the database, use the
--filter option. It will try to match the targeted mapped entity with the
provided pattern string.

php bin/console doctrine:mapping:import "MyCustomBundle" xml --filter=MyMatchedEntity

Use the --force option, if you want to override existing mapping files:

php bin/console doctrine:mapping:import "MyCustomBundle" xml --force