私はfindOneBy
自分のエンティティで単一の行を(使用して)見つけています。コードは次のとおりです。
$userown = $this->getDoctrine()->getRepository('GameShelfUsersBundle:Own')
->findOneBy(array(
'game' => $game->getId(),
'user' => $em->getRepository('GameShelfUsersBundle:User')->find($session->getId())
));
今、私はそれをとしてテンプレートに渡しますuserown
。しかし、を使用して小枝で印刷しようとすると{{ userown.typo }}
、エラーがスローされます。
An exception has been thrown during the rendering of a template ("Catchable Fatal Error: Object of class Proxies\__CG__\GameShelf\UsersBundle\Entity\OwnState could not be converted to string in D:\!!XAMPP\htdocs\
私のエンティティはここにあります。