diff --git a/EventListener/DoctrineEventSubscriber.php b/EventListener/DoctrineEventSubscriber.php index 9aadd06..a2acc12 100755 --- a/EventListener/DoctrineEventSubscriber.php +++ b/EventListener/DoctrineEventSubscriber.php @@ -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);