Sync: create objects with original key...

...and not with the lower-cased comparison key

fixes #2608
This commit is contained in:
Thomas Gelf 2022-09-22 17:36:42 +02:00
parent 0682ee5ba8
commit 60bdef6752
1 changed files with 3 additions and 1 deletions

View File

@ -483,10 +483,12 @@ class Sync
foreach ($this->sources as $source) {
$sourceId = $source->id;
$keyColumn = $source->get('key_column');
foreach ($this->imported[$sourceId] as $key => $row) {
// Workaround: $a["10"] = "val"; -> array_keys($a) = [(int) 10]
$key = (string) $key;
$originalKey = $row->$keyColumn;
if ($this->usedLowerCasedKeys) {
$key = strtolower($key);
}
@ -497,7 +499,7 @@ class Sync
} else {
$props = [
'object_type' => 'object',
'object_name' => $key
'object_name' => $originalKey,
];
}