【发布时间】:2020-10-27 12:45:20
【问题描述】:
我正在尝试使用 easyAdmin 3.x 在两个类之间建立一个简单的 ManyToMany 关系,当我尝试显示实体 CRUD 时,我经常遇到此错误:
“salles”字段的Doctrine类型为“4”,EasyAdmin尚不支持。
两个实体都存在函数__to string
public function __toString()
{
return $this->name;
}
我的 CrudController:
namespace App\Controller\Admin;
use App\Entity\Batiment;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
class BatimentCrudController extends AbstractCrudController
{
public static function getEntityFqcn(): string
{
return Batiment::class;
}
public function configureFields(string $pageName): iterable
{
return [
'name',
'salles'
];
}
}
easyadmin 3.x 不管理多对多关系吗?
是否有一种特殊的方式来管理和显示这些关系?
我发现了这个捆绑包,感谢您的帮助!
【问题讨论】:
-
你会展示你的 Batiment 实体类吗?
-
你能展示你的 batment 简单的管理配置(yaml)吗?
-
你找到解决这个问题的方法了吗?