POST request on many-to-many association

后端 未结 2 583
轻奢々
轻奢々 2021-01-28 18:55

I have two entities with a many-to-many association:

class User extends BaseUser

and

class Calendar
{
    /**
     * @var integ         


        
2条回答
  •  既然无缘
    2021-01-28 19:32

    You should add addPublisher(User $publisher) and removePublisher(User $publisher) methods.

    API Platform internally uses the Symfony PropertyAccess component, and this component requires such methods to be able to access to the private property.

提交回复
热议问题