1
0
mirror of synced 2025-01-18 22:41:43 +03:00
This commit is contained in:
Michaël Gallego 2014-01-20 09:13:41 +01:00
parent a55f2c48ca
commit 0d5de64c0f
2 changed files with 4 additions and 4 deletions

View File

@ -871,6 +871,7 @@ final class PersistentCollection implements Collection, Selectable
if ($this->association['type'] === ClassMetadata::MANY_TO_MANY) {
$persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
return new ArrayCollection($persister->loadCriteria($this, $criteria));
}

View File

@ -516,7 +516,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
}
$sql = implode(' AND ', $filterClauses);
return $sql ? "(" . $sql . ")" : "";
return $sql ? '(' . $sql . ')' : '';
}
/**
@ -560,8 +560,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
$mapping = $coll->getMapping();
$owner = $coll->getOwner();
$ownerMetadata = $this->em->getClassMetadata(get_class($owner));
$whereClauses = $params = array();
$whereClauses = $params = array();
foreach ($mapping['relationToSourceKeyColumns'] as $key => $value) {
$whereClauses[] = sprintf('t.%s = ?', $key);
@ -572,7 +571,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
foreach ($parameters as $parameter) {
list($name, $value) = $parameter;
$whereClauses[] = sprintf("te.%s = ?", $name);
$whereClauses[] = sprintf('te.%s = ?', $name);
$params[] = $value;
}