Skip to content

Commit

Permalink
Update AggregatePartListener.php (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
fre5h authored Feb 29, 2024
1 parent d1f4c9c commit 19dceaf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions EventListener/ORM/Aggregate/AggregatePartListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ public function onFlush(OnFlushEventArgs $eventArgs): void
}

foreach ($this->aggregateRoots as $aggregateRoot) {
$aggregateRoot->setUpdatedAt($this->dateTimeHelper->getCurrentDatetime());
$uow->recomputeSingleEntityChangeSet($em->getClassMetadata(\get_class($aggregateRoot)), $aggregateRoot);
if (!$uow->isScheduledForDelete($aggregateRoot)) {
$aggregateRoot->setUpdatedAt($this->dateTimeHelper->getCurrentDatetime());
$uow->recomputeSingleEntityChangeSet($em->getClassMetadata(\get_class($aggregateRoot)), $aggregateRoot);
}
}

$this->aggregateRoots = [];
Expand Down

0 comments on commit 19dceaf

Please sign in to comment.