Skip to content

Commit

Permalink
ManyToOneの出力が不完全になるため、detachを使うように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
chihiro-adachi committed Dec 23, 2020
1 parent f179120 commit 159496c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Eccube/Service/CsvExportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ public function exportData(\Closure $closure)
$query = $this->qb->getQuery();
foreach ($query->getResult() as $iterableResult) {
$closure($iterableResult, $this);
$this->entityManager->clear();
// https://github.com/EC-CUBE/ec-cube/issues/4775
// entityManager::detach内のtrigger errorを避けるため、UnitOfWork::detachを直接呼び出す
$this->entityManager->getUnitOfWork()->detach();
$query->free();
flush();
}
Expand Down

0 comments on commit 159496c

Please sign in to comment.