I am trying to delete records in many to many using Doctrine. I used code on http://www.doctrine-project.org/documentation/manual/1_2/ru/working-with-models#many-to-many-relations:deleting-a-link
when I do the first method, it just deletes UserGroup record ONLY. How do I delete User, Group, and UserGroup records at once? The second and thrid methods do not work as well.
You can use DQL to delete these records, but..
Are you sure that you want to do that? Before deleting all of them you should make sure that there is no other user using the group you are deleting and that the user you are deleting does not belong to any other groups.