瀏覽代碼

Correctif

feature/symfony6.1
Fabien Normand 3 年之前
父節點
當前提交
e624a53a1b
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      Component/EntityComponent.php

+ 2
- 1
Component/EntityComponent.php 查看文件

@@ -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…
取消
儲存