Explorar el Código

Correctif

feature/symfony6.1
Fabien Normand hace 3 años
padre
commit
e624a53a1b
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. +2
    -1
      Component/EntityComponent.php

+ 2
- 1
Component/EntityComponent.php Ver fichero

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

Cargando…
Cancelar
Guardar