Parcourir la source

Correctif

feature/symfony6.1
Fabien Normand il y a 2 ans
Parent
révision
e624a53a1b
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. +2
    -1
      Component/EntityComponent.php

+ 2
- 1
Component/EntityComponent.php Voir le fichier

@@ -68,8 +68,9 @@ class EntityComponent
$newEntity->setCreatedAt(new \DateTime());
}

$this->entityManager->create($newEntity);
$this->eventDispatcher->dispatch(new EntityComponentEvent($newEntity), EntityComponentEvent::DUPLICATE_EVENT);
//Ne pas utiliser create ici! Sinon pour certaine entité comme ProductFamily on réajoute un orginProduct
$this->entityManager->persist($newEntity);

return $newEntity;
}

Chargement…
Annuler
Enregistrer