1
0
mirror of synced 2025-02-09 00:39:25 +03:00
This commit is contained in:
Alessandro Frangioni 2017-06-05 11:47:15 +02:00 committed by Luís Cobucci
parent 1d8c7f9bac
commit af3591fbca
No known key found for this signature in database
GPG Key ID: EC61C5F01750ED3C

View File

@ -344,9 +344,13 @@ class BasicEntityPersister implements EntityPersister
. ' FROM ' . $tableName
. ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
$types = [];
foreach ($identifier as $fieldName) {
$types[] = $versionedClass->fieldMappings[$fieldName]['type'];
}
$flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id);
$value = $this->conn->fetchColumn($sql, array_values($flatId));
$value = $this->conn->fetchColumn($sql, array_values($flatId), 0, $types);
return Type::getType($fieldMapping['type'])->convertToPHPValue($value, $this->platform);
}