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

#1246 DDC-3487 - removed unused assignment, minor alignment fixes

This commit is contained in:
Marco Pivetta 2015-01-13 14:54:00 +01:00
parent 97d1d5343e
commit 7f71cbc8c7

View File

@ -347,7 +347,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
}
return 'DELETE FROM ' . $joinTable
. ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
. ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
}
/**
@ -430,10 +430,9 @@ class ManyToManyPersister extends AbstractCollectionPersister
*/
protected function getInsertRowSQL(PersistentCollection $coll)
{
$columns = array();
$mapping = $coll->getMapping();
$class = $this->em->getClassMetadata(get_class($coll->getOwner()));
$joinTable = $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform);
$columns = array();
$mapping = $coll->getMapping();
$class = $this->em->getClassMetadata(get_class($coll->getOwner()));
foreach ($mapping['joinTable']['joinColumns'] as $joinColumn) {
$columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
@ -443,8 +442,10 @@ class ManyToManyPersister extends AbstractCollectionPersister
$columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
}
return 'INSERT INTO ' . $joinTable . ' (' . implode(', ', $columns) . ')'
. ' VALUES (' . implode(', ', array_fill(0, count($columns), '?')) . ')';
return 'INSERT INTO ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform)
. ' (' . implode(', ', $columns) . ')'
. ' VALUES'
. ' (' . implode(', ', array_fill(0, count($columns), '?')) . ')';
}
/**