Many to many relation with ON DELETE CASCADE with Symfony and Doctrine
问题 I want a simple many to many relation with Symfony and Doctrine. This is really a unidirectional one-to-many association can be mapped through a join table as the docs indicate I am using a YAML file for configure this with the following code: In file Content.orm.yml: manyToMany: comments: cascade: ["persist","remove"] onDelete: CASCADE options: cascade: remove: true persist: true #refresh: true #merge: true #detach: true orphanRemoval: false orderBy: null targetEntity: Comment joinTable: