diff --git a/src/Kdyby/Doctrine/DI/OrmExtension.php b/src/Kdyby/Doctrine/DI/OrmExtension.php index 67fda2fb..431a4b2c 100644 --- a/src/Kdyby/Doctrine/DI/OrmExtension.php +++ b/src/Kdyby/Doctrine/DI/OrmExtension.php @@ -312,7 +312,7 @@ protected function processEntityManager($name, array $defaults) Validators::assertField($config['dql'], 'hints', 'array'); $autoGenerateProxyClasses = is_bool($config['autoGenerateProxyClasses']) - ? ($config['autoGenerateProxyClasses'] ? AbstractProxyFactory::AUTOGENERATE_ALWAYS : AbstractProxyFactory::AUTOGENERATE_NEVER) + ? ($config['autoGenerateProxyClasses'] ? AbstractProxyFactory::AUTOGENERATE_ALWAYS : AbstractProxyFactory::AUTOGENERATE_FILE_NOT_EXISTS) : $config['autoGenerateProxyClasses']; $configuration = $builder->addDefinition($this->prefix($name . '.ormConfiguration')) diff --git a/tests/KdybyTests/Doctrine/NonLockingUniqueInserter.phpt b/tests/KdybyTests/Doctrine/NonLockingUniqueInserter.phpt index 748ca127..74a0a657 100644 --- a/tests/KdybyTests/Doctrine/NonLockingUniqueInserter.phpt +++ b/tests/KdybyTests/Doctrine/NonLockingUniqueInserter.phpt @@ -70,7 +70,6 @@ class NonLockingUniqueInserterTest extends KdybyTests\Doctrine\ORMTestCase public function testSavingRelations() { $em = $this->createMemoryManager(); - $em->getProxyFactory()->generateProxyClasses($em->getMetadataFactory()->getAllMetadata()); $user = new CmsUser(); $user->username = 'HosipLan';