Commit a0f422e8 authored by Florentin L'Homme's avatar Florentin L'Homme
Browse files

Tentative de débug

parent 87caef18
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -168,6 +168,9 @@ EOT;

        $commaSeparatedColumnNames = implode(', ', array_keys($columnsValues));
        $commaSeparatedColumnValues = implode(', ', array_map(function($value) use ($platform) {
            if ($value === null) {
                return 'NULL';
            }
            return $platform->quoteStringLiteral($value);
        }, $columnsValues));

+13 −1
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@

namespace UnicaenDbImport;

use Doctrine\Common\EventManager;
use Doctrine\DBAL\Event\Listeners\OracleSessionInit;
use DoctrineORMModule\Options\EntityManager;
use UnicaenApp\Exception\RuntimeException;
use UnicaenDbImport\CodeGenerator\Common\AbstractCodeGenerator;
use UnicaenDbImport\Domain\DestinationInterface;
@@ -178,7 +181,16 @@ class DatabaseFacade
        $selectSql = $this->codeGenerator->generateSQLForSelectFromSource($source);

        // select from source
        $result = $this->queryExecutor->fetchAll($selectSql, $source->getConnection());
        //$a = $source->getConnection();
        //var_dump($a);
        //die("fin populate");
//        $evm = new EventManager();
//        $evm->addEventSubscriber(new OracleSessionInit(array(
//            'NLS_NUMERIC_CHARACTERS' => '.',
//        )));
        $a = $source->getConnection();
        $a->getEventManager()->addEventSubscriber(new OracleSessionInit());
        $result = $this->queryExecutor->fetchAll($selectSql, $a);

        $insertsSQL = '';
        foreach ($result as $row) {