Bug #28016
Cascade remove of cleared ArrayCollection
Status: | Needs Feedback | Start date: | 2011-07-09 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 0% |
|
Category: | Persistence | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | FLOW3 1.0.0 |
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
History
#1 Updated by Karsten Dambekalns almost 4 years ago
- Affected Flow version set to FLOW3 1.0.0
#2 Updated by Christian Müller over 3 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 3 years ago
Same here.
but i only tried the clear of array collection.
remove wasnt testet yet.
#4 Updated by Karsten Dambekalns over 2 years ago
- Assigned To set to Karsten Dambekalns