Php 将EasyAdminBundle与我的图像实体一起使用时出错

Php 将EasyAdminBundle与我的图像实体一起使用时出错,php,symfony,Php,Symfony,我想在后端使用EasyAdminBundle。 我有一个与我的文章实体一对一关系的图像实体。 当我尝试使用EasyAdminBundle的“创建文章”按钮时,出现以下错误: A "__toString()" method was not found on the objects of type "OAH\NewsBundle\Entity\Image" passed to the choice field. To read a custom getter instead, set the opt

我想在后端使用EasyAdminBundle。 我有一个与我的文章实体一对一关系的图像实体。 当我尝试使用EasyAdminBundle的“创建文章”按钮时,出现以下错误:

A "__toString()" method was not found on the objects of type "OAH\NewsBundle\Entity\Image" passed to the choice field. To read a custom getter instead, set the option "property" to the desired property path.
我试图在我的图像实体中放置一个“
\uuu-toString()
”方法,但这也不起作用。
有人知道如何解决这个问题吗?

您的
toString
函数是公共函数吗?是否清除了缓存和元缓存?(apc..)您的
toString
功能是公共的吗?是否清除了缓存和元缓存?(apc.)