diff --git a/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php b/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php index 6dc4f1db99cb9..4dd835b1bc221 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php +++ b/src/Symfony/Bundle/DoctrineBundle/Command/DoctrineCommand.php @@ -121,7 +121,7 @@ protected function getDoctrineEntityManagers() $entityManagers = array(); $ids = $this->container->getServiceIds(); foreach ($ids as $id) { - preg_match('/doctrine.orm.(.*)_entity_manager/', $id, $matches); + preg_match('/^doctrine.orm.(.*)_entity_manager$/', $id, $matches); if ($matches) { $name = $matches[1]; $entityManagers[$name] = $this->container->get($id);