1
0
mirror of synced 2025-03-26 09:53:54 +03:00

#1246 DDC-3487 - re-aligning SQL string concatenation for readability, fixed docblock return value hint

This commit is contained in:
Marco Pivetta 2015-01-13 14:37:32 +01:00
parent 5942b6c302
commit b99f4461be

View File

@ -249,7 +249,9 @@ class ManyToManyPersister extends AbstractCollectionPersister
* *
* @param array $mapping Array containing mapping information. * @param array $mapping Array containing mapping information.
* *
* @return string The SQL query part to add to a query. * @return string[] ordered tuple:
* - JOIN condition to add to the SQL
* - WHERE condition to add to the SQL
*/ */
public function getFilterSql($mapping) public function getFilterSql($mapping)
{ {
@ -262,11 +264,9 @@ class ManyToManyPersister extends AbstractCollectionPersister
} }
// A join is needed if there is filtering on the target entity // A join is needed if there is filtering on the target entity
$tableName = $this->quoteStrategy->getTableName($rootClass, $this->platform); $tableName = $this->quoteStrategy->getTableName($rootClass, $this->platform);
$joinSql = ' JOIN ' . $tableName . ' te' . ' ON'; $joinSql = ' JOIN ' . $tableName . ' te'
$onConditions = $this->getOnConditionSQL($mapping); . ' ON' . implode(' AND ', $this->getOnConditionSQL($mapping));
$joinSql .= implode(' AND ', $onConditions);
return array($joinSql, $filterSql); return array($joinSql, $filterSql);
} }