@@ -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; | |||
} |