Project

General

Profile

Actions

Bug #78128

closed

MM-Relations not correctly removed when deleting parent object

Added by Robert Jelinek about 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Extbase
Target version:
-
Start date:
2016-10-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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)


Files

mm-relations-remove.patch (461 Bytes) mm-relations-remove.patch Robert Jelinek, 2016-10-02 18:50
mm-relations-remove.patch (477 Bytes) mm-relations-remove.patch Robert Jelinek, 2016-10-02 19:49
issue78128_1.0.0_201610040938.zip (22.9 KB) issue78128_1.0.0_201610040938.zip Robert Jelinek, 2016-10-04 09:43
Actions

Also available in: Atom PDF