Symfony EasyAdmin 3.x ManyToMany error when adding : The Doctrine type of the …. field is "4", which is not supported by EasyAdmin yet

I’m trying to do a simple ManyToMany relation between two classes with easyAdmin 3.x , when I’m trying to show entity CRUD , I have constantly this error:

The Doctrine type of the "salles" field is "4", which is not supported by EasyAdmin yet.

Th function __to string exist for the both entity

public function __toString()
    {
        return $this->name;
    }

My CrudController:

namespace AppControllerAdmin;

use AppEntityBatiment;
use EasyCorpBundleEasyAdminBundleControllerAbstractCrudController;


class BatimentCrudController extends AbstractCrudController
{
    public static function getEntityFqcn(): string
    {
        return Batiment::class;
    }


    public function configureFields(string $pageName): iterable
    {
        return [
            'name',
            'salles'

        ];
    }

}

Does easyadmin 3.x don’t manage manytomany relations?

Is there a particular way to manage and display these relations?

I discover this bundle and thank you for your help !

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 1

Your email address will not be published. Required fields are marked *


Johannes Orphal

Johannes Orphal

Yeah, I’am doing the Symfony 5 book with EasyAdmin 3 which won’t work anyway with the FormBuilderInterface used by the AbstractCrudController of EasyAdmin :/