Skip to content

Commit

Permalink
Use parseRow instead of parse
Browse files Browse the repository at this point in the history
  • Loading branch information
michaljurecko committed Oct 29, 2020
1 parent c48a8bc commit 45643fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Extractor/CsvWriter/MappingCsvWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public function writeItem(object $item): void
// Remove ignored (generated) keys
$item = $this->removeIgnoredKeys($item);

// Ensure unique FK for same sub-documents from the different parent document
// Ensure UNIQUE FK for sub-documents with the SAME CONTENT, but from the DIFFERENT parent document
$userData = ['parentId' => md5(serialize($item))];
try {
$this->mapper->parse([$item], $userData);
$this->mapper->parseRow($item, $userData);
} catch (CsvMapperException $e) {
throw new UserException($e->getMessage(), $e->getCode(), $e);
}
Expand Down

0 comments on commit 45643fa

Please sign in to comment.