@@ -345,8 +345,8 @@ discard block |
||
345 | 345 | |
346 | 346 | // FIXME: Order with composite keys might not be correct |
347 | 347 | $sql = 'SELECT ' . $columnName |
348 | - . ' FROM ' . $tableName |
|
349 | - . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?'; |
|
348 | + . ' FROM ' . $tableName |
|
349 | + . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?'; |
|
350 | 350 | |
351 | 351 | |
352 | 352 | $flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id); |
@@ -495,8 +495,8 @@ discard block |
||
495 | 495 | } |
496 | 496 | |
497 | 497 | $sql = 'UPDATE ' . $quotedTableName |
498 | - . ' SET ' . implode(', ', $set) |
|
499 | - . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?'; |
|
498 | + . ' SET ' . implode(', ', $set) |
|
499 | + . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?'; |
|
500 | 500 | |
501 | 501 | $result = $this->conn->executeUpdate($sql, $params, $types); |
502 | 502 | |
@@ -652,24 +652,24 @@ discard block |
||
652 | 652 | // set $newVal = null, in order to insert a null value and schedule an |
653 | 653 | // extra update on the UnitOfWork. |
654 | 654 | // This is only required if the associated entity is different from the current one, |
655 | - // and if the current entity relies on the database to generate its id |
|
656 | - if ($newVal !== $entity) { |
|
657 | - $scheduleExtraUpdate = true; |
|
658 | - } else { |
|
659 | - $identifiers = $this->class->getIdentifier(); |
|
660 | - // Only single-column identifiers are supported |
|
661 | - if (1 === count($identifiers) && isset($entityChangeSet[$identifiers[0]])) { |
|
662 | - // Extra update is required if the current entity does not have yet a value for its identifier |
|
663 | - $scheduleExtraUpdate = ($entityChangeSet[$identifiers[0]][1] === null); |
|
664 | - } else { |
|
665 | - $scheduleExtraUpdate = true; |
|
666 | - } |
|
667 | - } |
|
668 | - |
|
669 | - if ($scheduleExtraUpdate) { |
|
670 | - $uow->scheduleExtraUpdate($entity, [$field => [null, $newVal]]); |
|
671 | - $newVal = null; |
|
672 | - } |
|
655 | + // and if the current entity relies on the database to generate its id |
|
656 | + if ($newVal !== $entity) { |
|
657 | + $scheduleExtraUpdate = true; |
|
658 | + } else { |
|
659 | + $identifiers = $this->class->getIdentifier(); |
|
660 | + // Only single-column identifiers are supported |
|
661 | + if (1 === count($identifiers) && isset($entityChangeSet[$identifiers[0]])) { |
|
662 | + // Extra update is required if the current entity does not have yet a value for its identifier |
|
663 | + $scheduleExtraUpdate = ($entityChangeSet[$identifiers[0]][1] === null); |
|
664 | + } else { |
|
665 | + $scheduleExtraUpdate = true; |
|
666 | + } |
|
667 | + } |
|
668 | + |
|
669 | + if ($scheduleExtraUpdate) { |
|
670 | + $uow->scheduleExtraUpdate($entity, [$field => [null, $newVal]]); |
|
671 | + $newVal = null; |
|
672 | + } |
|
673 | 673 | } |
674 | 674 | } |
675 | 675 | |
@@ -1549,9 +1549,9 @@ discard block |
||
1549 | 1549 | $lock = $this->getLockTablesSql($lockMode); |
1550 | 1550 | $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' '; |
1551 | 1551 | $sql = 'SELECT 1 ' |
1552 | - . $lock |
|
1553 | - . $where |
|
1554 | - . $lockSql; |
|
1552 | + . $lock |
|
1553 | + . $where |
|
1554 | + . $lockSql; |
|
1555 | 1555 | |
1556 | 1556 | list($params, $types) = $this->expandParameters($criteria); |
1557 | 1557 | |
@@ -2003,8 +2003,8 @@ discard block |
||
2003 | 2003 | $alias = $this->getSQLTableAlias($this->class->name); |
2004 | 2004 | |
2005 | 2005 | $sql = 'SELECT 1 ' |
2006 | - . $this->getLockTablesSql(null) |
|
2007 | - . ' WHERE ' . $this->getSelectConditionSQL($criteria); |
|
2006 | + . $this->getLockTablesSql(null) |
|
2007 | + . ' WHERE ' . $this->getSelectConditionSQL($criteria); |
|
2008 | 2008 | |
2009 | 2009 | list($params, $types) = $this->expandParameters($criteria); |
2010 | 2010 | |
@@ -2034,9 +2034,9 @@ discard block |
||
2034 | 2034 | { |
2035 | 2035 | // if one of the join columns is nullable, return left join |
2036 | 2036 | foreach ($joinColumns as $joinColumn) { |
2037 | - if ( ! isset($joinColumn['nullable']) || $joinColumn['nullable']) { |
|
2038 | - return 'LEFT JOIN'; |
|
2039 | - } |
|
2037 | + if ( ! isset($joinColumn['nullable']) || $joinColumn['nullable']) { |
|
2038 | + return 'LEFT JOIN'; |
|
2039 | + } |
|
2040 | 2040 | } |
2041 | 2041 | |
2042 | 2042 | return 'INNER JOIN'; |