Doctrine - A new entity was found through the relationship

后端 未结 7 2058
天涯浪人
天涯浪人 2020-11-30 05:41

since 2 weeks, we are having this problem while trying to flush new elements:

CRITICAL: Doctrine\\ORM\\ORMInvalidArgumentException:

A new

7条回答
  •  难免孤独
    2020-11-30 05:46

    In my case a too early call of

    $this->entityManager->clear();
    

    caused the problem. It also disappeared by only doing a clear on the recent object, like

    $this->entityManager->clear($capture);
    

提交回复
热议问题