diff --git a/EventListener/DoctrineEventSubscriber.php b/EventListener/DoctrineEventSubscriber.php index 3a44566..2b274bb 100755 --- a/EventListener/DoctrineEventSubscriber.php +++ b/EventListener/DoctrineEventSubscriber.php @@ -42,7 +42,7 @@ public function onFlush(OnFlushEventArgs $args) foreach($identityMap as $map) { foreach($map as $object) { $changes = $uow->getEntityChangeSet($object); - if(count($changes) > 1 || (count($changes) > 0 && !isset($changes["lastTimestamp"]))) { + if(count($changes) > 1 || (count($changes) > 0 && !isset($changes["lastTimestamp"]) && !isset($changes["lastLogin"]))) { $somethingChanged = true; break; } @@ -59,7 +59,7 @@ public function onFlush(OnFlushEventArgs $args) foreach ($uow->getScheduledEntityUpdates() as $keyEntity => $entity) { $changes = $uow->getEntityChangeSet($entity); - if(count($changes) == 1 && isset($changes["lastTimestamp"]) && !$somethingChanged) { + if(count($changes) == 1 && isset($changes["lastTimestamp"]) && !isset($changes["lastLogin"]) && !$somethingChanged) { $oid = spl_object_hash($entity); $uow->clearEntityChangeSet($oid); } else { @@ -96,4 +96,4 @@ private function handleEntityChange(EntityManagerInterface $em, $entity) { } -} \ No newline at end of file +}