Import: exception for missing key column...

...but skip check for now
This commit is contained in:
Thomas Gelf 2015-07-26 15:38:29 +02:00
parent 666aafc842
commit c9e5f16d3e
1 changed files with 9 additions and 1 deletions

View File

@ -32,8 +32,16 @@ class Import
foreach (ImportSourceHook::loadByName($source->source_name, $connection)->fetchData() as $row) { foreach (ImportSourceHook::loadByName($source->source_name, $connection)->fetchData() as $row) {
// TODO: Check for name collision // TODO: Check for name collision
if (! isset($row->$keyColumn)) { if (! isset($row->$keyColumn)) {
die('Depp'); continue;
throw new \Exception(
sprintf(
'No key column "%s" in row: %s',
$keyColumn,
json_encode($row)
)
);
} }
$object_name = $row->$keyColumn; $object_name = $row->$keyColumn;
$rowChecksums = array(); $rowChecksums = array();
$keys = array_keys((array) $row); $keys = array_keys((array) $row);