@@ 1385-1393 (lines=9) @@ | ||
1382 | if ($columnsList !== null) { |
|
1383 | $joinSql = ''; |
|
1384 | $parentFks = $this->getParentRelationshipForeignKeys($mainTable); |
|
1385 | foreach ($parentFks as $fk) { |
|
1386 | $joinSql .= sprintf(' JOIN %s ON (%s.%s = %s.%s)', |
|
1387 | $this->connection->quoteIdentifier($fk->getForeignTableName()), |
|
1388 | $this->connection->quoteIdentifier($fk->getLocalTableName()), |
|
1389 | $this->connection->quoteIdentifier($fk->getLocalColumns()[0]), |
|
1390 | $this->connection->quoteIdentifier($fk->getForeignTableName()), |
|
1391 | $this->connection->quoteIdentifier($fk->getForeignColumns()[0]) |
|
1392 | ); |
|
1393 | } |
|
1394 | ||
1395 | $childrenFks = $this->getChildrenRelationshipForeignKeys($mainTable); |
|
1396 | foreach ($childrenFks as $fk) { |
|
@@ 1396-1404 (lines=9) @@ | ||
1393 | } |
|
1394 | ||
1395 | $childrenFks = $this->getChildrenRelationshipForeignKeys($mainTable); |
|
1396 | foreach ($childrenFks as $fk) { |
|
1397 | $joinSql .= sprintf(' LEFT JOIN %s ON (%s.%s = %s.%s)', |
|
1398 | $this->connection->quoteIdentifier($fk->getLocalTableName()), |
|
1399 | $this->connection->quoteIdentifier($fk->getForeignTableName()), |
|
1400 | $this->connection->quoteIdentifier($fk->getForeignColumns()[0]), |
|
1401 | $this->connection->quoteIdentifier($fk->getLocalTableName()), |
|
1402 | $this->connection->quoteIdentifier($fk->getLocalColumns()[0]) |
|
1403 | ); |
|
1404 | } |
|
1405 | ||
1406 | $sql = 'SELECT '.implode(', ', $columnsList).' FROM ('.$sql.') AS '.$mainTable.' '.$joinSql; |
|
1407 | } |