From b83eacaa0ee2d435e00be3555099ccdfaec6643a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BCrk?= Date: Mon, 10 Nov 2025 18:21:10 +0100 Subject: [PATCH] [BUGFIX] Use the doctrine type instead of binding type in `DataSet` This change uses the doctrine type instead of the type bindingtype in `DataSet->import()` still ensuring that the value is encoded with current implementation within the TYPO3 Connection, while preparing to remove custom handling and using Doctrine DBAL behavour. With this modification both code paths are working. Additionally, the columnname is now used for the created types array effectly fixing a bug that this information has not been used and fallback to database schema was used anyway. Releases: main, 9, 8 --- Classes/Core/Functional/Framework/DataHandling/DataSet.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Classes/Core/Functional/Framework/DataHandling/DataSet.php b/Classes/Core/Functional/Framework/DataHandling/DataSet.php index 77f0c0b5..c6ee20e4 100644 --- a/Classes/Core/Functional/Framework/DataHandling/DataSet.php +++ b/Classes/Core/Functional/Framework/DataHandling/DataSet.php @@ -79,7 +79,7 @@ public static function import(string $path): void // types correctly (like Connection::PARAM_LOB) allows doctrine to create valid SQL $types = []; foreach ($element as $columnName => $columnValue) { - $columnType = $tableDetails->getColumn($columnName)->getType(); + $types[$columnName] = $columnType = $tableDetails->getColumn($columnName)->getType(); // JSON-Field data is converted (json-encode'd) within $connection->insert(), and since json field // data can only be provided json encoded in the csv dataset files, we need to decode them here. if ($element[$columnName] !== null @@ -87,7 +87,6 @@ public static function import(string $path): void ) { $element[$columnName] = $columnType->convertToPHPValue($columnValue, $platform); } - $types[] = $columnType->getBindingType(); } // Insert the row $connection->insert($tableName, $element, $types);