1
0
mirror of synced 2025-02-09 00:39:25 +03:00

#1169 DDC-3343 - actually deleting associated elements when they are orphaned and EXTRA_LAZY is used

This commit is contained in:
Marco Pivetta 2015-02-05 00:25:06 +00:00
parent c4ab4db743
commit 2fa48c6e88

View File

@ -249,16 +249,6 @@ class OneToManyPersister extends AbstractCollectionPersister
$sql = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform)
. ' WHERE ' . implode('= ? AND ', $class->getIdentifierColumnNames()) . ' = ?';
if ($element instanceof Proxy && ! $element->__isInitialized()) {
$element->__load();
}
// clearing owning side value
$targetMetadata->reflFields[$mapping['mappedBy']]->setValue($element, null);
$this->uow->computeChangeSet($targetMetadata, $element);
$persister->update($element);
return true;
return (bool) $this->conn->executeUpdate($sql, $this->getDeleteRowSQLParameters($coll, $element));
}
}