1
0
mirror of synced 2025-03-09 14:26:13 +03:00

DDC-3343 - corrected persister logic - only uses the entity persister to perform deletes on the owning side

This commit is contained in:
Marco Pivetta 2015-02-05 00:52:54 +00:00
parent a1bd3e8cc9
commit f5705d6d95

@ -244,10 +244,11 @@ class OneToManyPersister extends AbstractCollectionPersister
return false;
}
$class = $this->em->getClassMetadata($mapping['targetEntity']);
$sql = 'DELETE FROM ' . $this->quoteStrategy->getTableName($class, $this->platform)
. ' WHERE ' . implode('= ? AND ', $class->getIdentifierColumnNames()) . ' = ?';
$this
->uow
->getEntityPersister($mapping['targetEntity'])
->delete($element);
return (bool) $this->conn->executeUpdate($sql, $this->getDeleteRowSQLParameters($coll, $element));
return true;
}
}