I\'m using Doctrine 2 and I want to generate an ORM of my database but I don\'t want select all tables of the db.
For example, in this db :
If you use Doctrine2 without Symfony then you should add this line to your bootstrap:
// With this expression all tables prefixed with Table1 will ignored by the schema tool.
$entityManager->getConnection()->getConfiguration()->setFilterSchemaAssetsExpression("~^(?!Table1)~");
the whole bootstrap looks like
'pdo_mysql',
'user' => 'username',
'password' => 'password',
'dbname' => 'database',
);
/** @var $entityManager \Doctrine\ORM\EntityManager */
$entityManager = EntityManager::create($dbParams, $config);
// Set the other connections parameters
$conn = $entityManager->getConnection();
$platform = $conn->getDatabasePlatform();
$platform->registerDoctrineTypeMapping('enum', 'string');
// With this expression all tables prefixed with t_ will ignored by the schema tool.
$conn->getConfiguration()->setFilterSchemaAssetsExpression("~^(?!t__)~");