Open Asyjjan opened 1 year ago
So I tried to do it without easyadmin and I got the same error, I think it's more about the formType but I can't guess why
the problem is that FOR SIMPLE TASKS as get list of values from database into form you have to write a lot of unnesesery code. It is called Data Transformers.
Hi, i'm on symfony 6.3 and easyadmin 4.7.2 and i got an entity order that has products in ManyToMany, which has toppings in ManyToMany too.
I created in the order crud a collectionField for products which take a FormType that I have created to have a collection of products and for each product you can add one or more toppings, it works great at the created but when I want to edit the form brings me an error that I can't solve and understand.
My field
My formtype
the error i'm getting
Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader::getIdValue(): Argument #1 ($object) must be of type ?object, string given, called in /var/www/CaisseAtixys/vendor/symfony/form/ChoiceList/Loader/AbstractChoiceLoader.php on line 49
When I tried to debug AbstractChoiceLoader on line 49, I got my list of toppings (objects) and at the ends I have this