diff --git a/src/DoctrineWrapper.php b/src/DoctrineWrapper.php index c74b4a6..20d69cf 100644 --- a/src/DoctrineWrapper.php +++ b/src/DoctrineWrapper.php @@ -45,9 +45,9 @@ public static function getEntityManager($prefix = 'default') $credentials = self::getCredentials($prefix); if (!in_array($prefix, self::$orm)) { - $setup = Setup::createAnnotationMetadataConfiguration([$credentials['entities']], getenv('DEV_MODE'), ROOT . getenv('PROXY_DIR'), null, false); + $isDevMode = 'true' === getenv('DEV_MODE'); + $setup = Setup::createAnnotationMetadataConfiguration([$credentials['entities']], $isDevMode, getenv('PROXY_DIR'), null, false); $setup->setNamingStrategy(new UnderscoreNamingStrategy()); - self::$orm[$prefix] = EntityManager::create($credentials, $setup); }