0
사람들 교리를 편집하는 데 문제가 있습니다.ZF2 + 교리를 업데이트하는 시간에 오류가 발생했습니다.
다음과 같은 오류가 발생합니다 치명적인 오류 :
에 비 객체() 지속 멤버 함수를 호출 아래에있는 내 코드입니다 :
public function editAction()
{
$id = $this->params()->fromRoute('id', 0);
$user_update = $this->getEntityManager()->find('CodeDemo\Entity\User', $id);
$user_update->setName('User example');
$user_update->setEmail('[email protected]');
$user_update->setDate(new \DateTime('02/02/02'));
$this->getEntityManager()->persist($user_update);
$this->getEntityManager()->flush();
}
감사합니다!