Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Classes/Core/Functional/Framework/DataHandling/DataSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,12 @@ 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 ($columnValue !== null && $columnType instanceof JsonType) {
$element[$columnName] = $columnType->convertToPHPValue($columnValue, $platform);
}
$types[] = $columnType->getBindingType();
}
// Insert the row
$connection->insert($tableName, $element, $types);
Expand Down