Embed a Collection of Forms Error: Could not determine access type for property

后端 未结 8 1324
悲哀的现实
悲哀的现实 2021-02-18 22:34

I am trying to embed collection of Tag forms to Service form, according to this tutorial. Tag and Service entities have many-

8条回答
  •  遇见更好的自我
    2021-02-18 23:05

    It's a long shot, but looking at your annotations I think the problem might be related to your manyToMany relationship. Try to change the owning side and inverse side (Swap the relationship) unless you specifically need to update from both ends (In that case I think the only solution is to add the objects manually or use oneToMany relationships).

    Changes made only to the inverse side of an association are ignored. Make sure to update both sides of a bidirectional association (or at least the owning side, from Doctrine’s point of view)

    This is a problem related to Doctrine I have suffered before, see: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/unitofwork-associations.html

提交回复
热议问题