Skip to content

Commit

Permalink
Fixed entity manager persisting invoice after detaching
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Vison committed Mar 19, 2018
1 parent 781eb49 commit ae8d4f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion EventListener/DoctrineEventSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public function onFlush(OnFlushEventArgs $args)
$changes = $uow->getEntityChangeSet($entity);

if(count($changes) == 1 && isset($changes["lastTimestamp"])) {
$uow->detach($entity);
$oid = spl_object_hash($entity);
$uow->clearEntityChangeSet($oid);
continue;
}
$this->handleEntityChange($em, $entity);
Expand Down

0 comments on commit ae8d4f8

Please sign in to comment.