Remove relations from ManyToMany object?

How can I remove existing manytomany relational links from an object?

$robot->parts = $robot->getParts();

I would like to remove relations between some of the parts, how can I achieve this?

Kr, Scripton



19.5k

And why you just not set every $robot->part to null? I think it'll work. But I'm not sure what you really want.



7.5k

That does not work, i have tried modifying the retrieved parts but this results in only the parts that are present being updated. The removed parts do not get removed from the relations upon saving.