Symfony2 Doctrine many-to-many bidirectional save form type
问题 I have a problem saving entities with forms. The relationship that gives me problems is many-to-many bidirectional. Agent Entity /** * @var \Doctrine\Common\Collections\ArrayCollection $agentLists * * @ORM\ManyToMany(targetEntity="AgentList", inversedBy="agents") * @ORM\JoinTable(name="agent_agentlist", * joinColumns={@ORM\JoinColumn(name="agent_id", referencedColumnName="id")}, * inverseJoinColumns={@ORM\JoinColumn(name="agentlist_id", referencedColumnName="id")} * ) */ protected $agentLists