1 2 3 4 5 6 7 8 9
| 在rollback之后,EntityManager可能会关闭,导致后续的数据库操作无法进行下去 解决方式: if (!$this->entityManager->isOpen()) { // 重新打开实体管理器 $this->entityManager = $this->entityManager->create( $this->entityManager->getConnection(), $this->entityManager->getConfiguration() ); }
|