The EntityManager is closed

前端 未结 17 1748
星月不相逢
星月不相逢 2020-11-29 18:36
[Doctrine\\ORM\\ORMException]   
The EntityManager is closed.  

After I get a DBAL exception when inserting data, EntityManager closes and I\'m not

17条回答
  •  Happy的楠姐
    2020-11-29 18:48

    I had this issue. This how I fixed it.

    The connection seems to close while trying to flush or persist. Trying to reopen it is a bad choice because creates new issues. I tryed to understand why the connection was closed and found that I was doing too many modifications before the persist.

    persist() earlier solved the issue.

提交回复
热议问题