Fabien Normand 3 anni fa
parent
commit
e624a53a1b
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. +2
    -1
      Component/EntityComponent.php

+ 2
- 1
Component/EntityComponent.php Vedi File

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

Loading…
Annulla
Salva