[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:
parent
9b78100378
commit
5b3f54429a
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue