Skip to content

Commit

Permalink
Fix Doctrine source iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
ossinkine authored and franmomu committed Sep 30, 2020
1 parent 9d2ca11 commit b5ea9b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Source/DoctrineODMQuerySourceIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ public function current()
{
$current = $this->iterator->current();

return $this->getCurrentData($current[0]);
$data = $this->getCurrentData($current[0]);

$this->query->getDocumentManager()->clear();

return $data;
}

public function rewind(): void
Expand Down
6 changes: 5 additions & 1 deletion src/Source/DoctrineORMQuerySourceIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ public function current()
{
$current = $this->iterator->current();

return $this->getCurrentData($current[0]);
$data = $this->getCurrentData($current[0]);

$this->query->getEntityManager()->clear();

return $data;
}

final public function rewind(): void
Expand Down

0 comments on commit b5ea9b1

Please sign in to comment.