Loading config/unicaen-db-import.local.php.dist +11 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ namespace Application; use Doctrine\DBAL\Event\Listeners\OracleSessionInit; return [ /** * Configuration Doctrine minimum requise. Loading Loading @@ -30,7 +32,15 @@ return [ 'password' => '???', 'dbname' => '???', 'charset' => 'AL32UTF8', ] ], 'eventmanager' => 'orm_sifac', ], ], 'eventmanager' => [ 'orm_sifac' => [ 'subscribers' => [ OracleSessionInit::class, ], ], ], ], Loading src/UnicaenDbImport/DatabaseFacade.php +2 −15 Original line number Diff line number Diff line Loading @@ -182,21 +182,8 @@ class DatabaseFacade $selectSql = $this->codeGenerator->generateSQLForSelectFromSource($source); // // Inscription manuelle du listener OracleSessionInit. // TODO: trouver pourquoi l'inscription automatique ne fonctionne pas. // try { $sourcePlatform = $source->getConnection()->getDatabasePlatform(); } catch (DBALException $e) { throw new RuntimeException("Impossible de déterminer le type de SGBD", null, $e); } if ($sourcePlatform instanceof OraclePlatform) { $a = $source->getConnection(); $a->getEventManager()->addEventSubscriber(new OracleSessionInit()); $result = $this->queryExecutor->fetchAll($selectSql, $a); } // // select from source $result = $this->queryExecutor->fetchAll($selectSql, $source->getConnection()); $insertsSQL = ''; foreach ($result as $row) { Loading Loading
config/unicaen-db-import.local.php.dist +11 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ namespace Application; use Doctrine\DBAL\Event\Listeners\OracleSessionInit; return [ /** * Configuration Doctrine minimum requise. Loading Loading @@ -30,7 +32,15 @@ return [ 'password' => '???', 'dbname' => '???', 'charset' => 'AL32UTF8', ] ], 'eventmanager' => 'orm_sifac', ], ], 'eventmanager' => [ 'orm_sifac' => [ 'subscribers' => [ OracleSessionInit::class, ], ], ], ], Loading
src/UnicaenDbImport/DatabaseFacade.php +2 −15 Original line number Diff line number Diff line Loading @@ -182,21 +182,8 @@ class DatabaseFacade $selectSql = $this->codeGenerator->generateSQLForSelectFromSource($source); // // Inscription manuelle du listener OracleSessionInit. // TODO: trouver pourquoi l'inscription automatique ne fonctionne pas. // try { $sourcePlatform = $source->getConnection()->getDatabasePlatform(); } catch (DBALException $e) { throw new RuntimeException("Impossible de déterminer le type de SGBD", null, $e); } if ($sourcePlatform instanceof OraclePlatform) { $a = $source->getConnection(); $a->getEventManager()->addEventSubscriber(new OracleSessionInit()); $result = $this->queryExecutor->fetchAll($selectSql, $a); } // // select from source $result = $this->queryExecutor->fetchAll($selectSql, $source->getConnection()); $insertsSQL = ''; foreach ($result as $row) { Loading