Bug #28016

Cascade remove of cleared ArrayCollection

Added by Henrik Møller Rasmussen about 10 years ago. Updated over 8 years ago.

Status:
Needs Feedback
Priority:
Should have
Category:
Persistence
Target version:
-
Start date:
2011-07-09
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

If an aggregate root calls the clear() method of an ArrayCollection property with cascade="all", the child items are not removed from the database.

If however, you iterate through the collection calling remove($item) on the ArrayCollection, the items are removed from the DB.


Related issues

Related to TYPO3.Flow - Bug #36804: Orphaned entities within aggregates are not removedNew2012-05-03

Actions
#2

Updated by Christian Müller over 9 years ago

  • Status changed from New to Needs Feedback
  • Has patch set to No

Is this still the case? From what I see the behavior of remove and clear should be the same.

#3

Updated by Carsten Bleicker over 9 years ago

Same here.
but i only tried the clear of array collection.
remove wasnt testet yet.

#4

Updated by Karsten Dambekalns over 8 years ago

  • Assignee set to Karsten Dambekalns

Also available in: Atom PDF