小编jer*_*her的帖子

添加 Symfony EasyAdmin 3.x ManyToMany 错误:The Doctrine type of the .... 字段为“4”,EasyAdmin 尚不支持

我正在尝试使用 easyAdmin 3.x 在两个类之间建立一个简单的 ManyToMany 关系,当我尝试显示实体 CRUD 时,我经常出现此错误:

“salles”字段的Doctrine类型为“4”,EasyAdmin尚不支持。

这两个实体都存在函数 __to string

public function __toString()
    {
        return $this->name;
    }
Run Code Online (Sandbox Code Playgroud)

我的 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'

        ];
    }

}
Run Code Online (Sandbox Code Playgroud)

easyadmin 3.x 不管理多对多关系吗?

有没有一种特殊的方式来管理和显示这些关系?

我发现了这个捆绑包,感谢您的帮助!

symfony easyadmin

5
推荐指数
2
解决办法
4453
查看次数

标签 统计

easyadmin ×1

symfony ×1