1
0
mirror of synced 2025-01-19 06:51:40 +03:00

#1246 DDC-3487 - removing possible undefined value path for $newValId for clarity

This commit is contained in:
Marco Pivetta 2015-01-13 14:05:27 +01:00
parent bc268da8c2
commit a8dcc2acf3

View File

@ -655,6 +655,8 @@ class BasicEntityPersister implements EntityPersister
}
}
$newValId = null;
if ($newVal !== null) {
$newValId = $uow->getEntityIdentifier($newVal);
}
@ -667,14 +669,11 @@ class BasicEntityPersister implements EntityPersister
$targetColumn = $joinColumn['referencedColumnName'];
$quotedColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
$this->quotedColumns[$sourceColumn] = $quotedColumn;
$this->columnTypes[$sourceColumn] = $targetClass->getTypeOfColumn($targetColumn);
$value = ($newVal !== null)
$this->quotedColumns[$sourceColumn] = $quotedColumn;
$this->columnTypes[$sourceColumn] = $targetClass->getTypeOfColumn($targetColumn);
$result[$owningTable][$sourceColumn] = $newValId
? $newValId[$targetClass->getFieldForColumn($targetColumn)]
: null;
$result[$owningTable][$sourceColumn] = $value;
}
}