1
0
mirror of synced 2025-01-18 22:41:43 +03:00

#1178 - fetching actual target entity when resolving column types of it

This commit is contained in:
Marco Pivetta 2015-01-17 06:21:16 +01:00
parent a39b6869ca
commit f88f5ce454

View File

@ -602,10 +602,11 @@ class ManyToManyPersister extends AbstractCollectionPersister
foreach ($mapping['joinTableColumns'] as $joinTableColumn) {
if (isset($mapping[$relationMode][$joinTableColumn])) {
$whereClauses[] = 't.' . $joinTableColumn . ' = ?';
$column = $mapping[$relationMode][$joinTableColumn];
$params[] = $id[$targetEntity->getFieldForColumn($column)];
$types[] = PersisterHelper::getTypeOfColumn($column, $targetEntity, $this->em);
$whereClauses[] = 't.' . $joinTableColumn . ' = ?';
$column = $mapping[$relationMode][$joinTableColumn];
$columnOwningClass = $this->em->getClassMetadata($mapping['targetEntity']);
$params[] = $id[$columnOwningClass->getFieldForColumn($column)];
$types[] = PersisterHelper::getTypeOfColumn($column, $columnOwningClass, $this->em);
} elseif ( ! $joinNeeded) {
$whereClauses[] = 't.' . $joinTableColumn . ' = ?';
$params[] = $key;