Skip to content

Commit

Permalink
#608 Change data array into array of entity_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Carlyon committed Nov 7, 2018
1 parent de581ca commit 87826bb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Migration/Step/OrderGridsEE/Delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,22 @@ public function perform()

$destinationDocument = $documentMap[$sourceDocName];
do {
$idArray = array();
if (is_array($items[0])) {
foreach ($items as $key => $value) {
$idArray[] = $value[$idKey];
}
} else {
$idArray = $items;
}
$this->destination->deleteRecords(
$this->destination->addDocumentPrefix($destinationDocument),
$idKey,
$items
$idArray
);
$documentNameDelta = $this->source->getDeltaLogName($sourceDocName);
$documentNameDelta = $this->source->addDocumentPrefix($documentNameDelta);
$this->markRecordsProcessed($documentNameDelta, $idKey, $items);
$this->markRecordsProcessed($documentNameDelta, $idKey, $idArray);
} while (!empty($items = $this->source->getChangedRecords($sourceDocName, $idKey, $page++)));
}
return true;
Expand Down

0 comments on commit 87826bb

Please sign in to comment.