// to cause the lookup to return no results. On PostgreSQL this causes an
// exception because 'INVALID_NID' is not the expected type.
return [];
} } /**
* {@inheritdoc}
*/
public function saveIdMapping(Row
$row, array
$destination_id_values,
$source_row_status = MigrateIdMapInterface::STATUS_IMPORTED,
$rollback_action = MigrateIdMapInterface::ROLLBACK_DELETE
) { // Construct the source key.
$source_id_values =
$row->
getSourceIdValues();
// Construct the source key and initialize to empty variable keys.
$fields =
[];
foreach ($this->
sourceIdFields() as $field_name =>
$key_name) { // A NULL key value is usually an indication of a problem.
if (!
isset($source_id_values[$field_name])) { $this->message->
display($this->
t( 'Did not save to map table due to NULL value for key field @field',
['@field' =>
$field_name]), 'error'
);
return;
} $fields[$key_name] =
$source_id_values[$field_name];
}