#78128MM-Relations not correctly removed when deleting parent object
Description
Situation:
Table A, B
A contains objects
B contains objects with an MM-relation to A
In that situation extbase uses an intermediate table C holding the references from B to A
Deleting rows from B with repository->remove(x) does not clean up the references in the intermediate table. It only removes the row from B.
This leads to buggy behaviour, because the intermediate table holds active entries, which are used when a new row in B will be created with the UID of the deleted row.
Solution: see attached patch (only 3 lines)