Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Complete MetadataFactory config addition

  • Loading branch information...
commit 059757cef35d9ea21310f87d19da68e268eef52b 1 parent e24d4d5
@superdweebie superdweebie authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/DoctrineMongoODMModule/Service/ConfigurationFactory.php
View
11 src/DoctrineMongoODMModule/Service/ConfigurationFactory.php
@@ -18,7 +18,6 @@
*/
namespace DoctrineMongoODMModule\Service;
-use Doctrine\Common\Annotations\AnnotationRegistry;
use DoctrineModule\Service\AbstractFactory;
use Doctrine\ODM\MongoDB\Configuration;
use Zend\ServiceManager\ServiceLocatorInterface;
@@ -73,11 +72,15 @@ public function createService(ServiceLocatorInterface $serviceLocator)
$config->addFilter($alias, $class);
}
- // finally, the driver
+ // the driver
$config->setMetadataDriverImpl($serviceLocator->get($options->getDriver()));
- $config->setClassMetadataFactoryName($options->getClassMetadataFactoryName());
-
+ // metadataFactory, if set
+ $factoryName = $options->getClassMetadataFactoryName();
+ if (isset($factoryName)){
+ $config->setClassMetadataFactoryName($factoryName);
+ }
+
return $config;
}
Please sign in to comment.
Something went wrong with that request. Please try again.