1
0
mirror of synced 2025-01-29 19:41:45 +03:00

[DDC-2074] Fixed bug regarding clearing PC's without owner

When calling clear on a PC that has no owner (e.g. because it was
cloned), it can't be deleted as there is no metadata available.
In these cases, it shouldn't be scheduled for deletion.
This commit is contained in:
Jan Kramer 2012-11-25 19:13:32 +01:00
parent 9b78100378
commit 5b3f54429a

View File

@ -655,7 +655,7 @@ final class PersistentCollection implements Collection, Selectable
$this->initialized = true; // direct call, {@link initialize()} is too expensive
if ($this->association['isOwningSide']) {
if ($this->association['isOwningSide'] && $this->owner) {
$this->changed();
$uow->scheduleCollectionDeletion($this);