Commit 660bbef4 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

[FIX] Correction du SQL généré pour l'update de synchro : les colonnes...

[FIX] Correction du SQL généré pour l'update de synchro : les colonnes histo_destruct* était mises à null, ce qui est incompatible avec la nouvelle option 'update_if_deleted_enabled_column'.
parent 4093d9f4
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
Changelog
=========

6.1.1
-----
- [FIX] Correction du SQL généré pour l'update de synchro : les colonnes histo_destruct* était mises à null, ce qui est 
  incompatible avec la nouvelle option 'update_if_deleted_enabled_column'.

6.1.0
-----
- Liste des synchros : affichage de l'erreur de génération de la vue diff le cas échéant.
+16 −0
Original line number Diff line number Diff line
@@ -532,6 +532,22 @@ EOT;
        switch ($operation) {

            case Operation::OPERATION_UPDATE:
                $colUpdates = array_map(function ($col) {
                    return "$col = diff.S_$col";
                }, $columns);

                $updatedOnColumn = $this->config->getHistoColumnAliasForUpdatedOn();
                $updatedByColumn = $this->config->getHistoColumnAliasForUpdatedBy();
                $updatedByValue = $this->config->getHistoColumnValueForUpdatedBy();
                $updatedByValue = $updatedByValue !== null ? $updatedByValue : 'NULL';
                array_unshift($colUpdates,
                    "$updatedOnColumn = $now",
                    "$updatedByColumn = $updatedByValue",
                );

                $setters = implode(', ', $colUpdates);
                break;

            case Operation::OPERATION_UNDELETE:
                $colUpdates = array_map(function ($col) {
                    return "$col = diff.S_$col";