How to avoid “Entities passed to the choice field must be managed. Maybe persist them in the entity manager?”

前端 未结 5 1765
既然无缘
既然无缘 2020-12-20 19:56
  1. Generated Entities from existing database
  2. Generated CRUD controller

But it does not work with exception message:

Entit

5条回答
  •  离开以前
    2020-12-20 20:46

    In my case I was having this issue because I was using EntityType instead of ChoiceType, to build the selectList.

    EntityType display only data from database, instead ChoiceType can display "not managed" objects.

    I hope this will help.

提交回复
热议问题