Using Doctrine 2 and Symfony 2.0.
I have two Doctrine objects (suppose EntityA and EntityB).
I have a ManyToMany relationship between them. Therefore, the EntityA_EntityB table was created in the database.
Using DQL or QueryBuilder, how can I remove EntityA_EntityB from this relationship table?
Docrtine offers something like this to accomplish something like this:
->delete()
->from('EntityA a')
->where('a.id', '?', $id);
But I really don't understand how to delete a row from a relationship table.
source
share