1
0
mirror of synced 2025-03-06 21:06:16 +03:00

Inferring id's field types

This commit is contained in:
Alessandro Frangioni 2017-06-06 17:28:34 +02:00 committed by Luís Cobucci
parent af3591fbca
commit 4ef0a238bf
No known key found for this signature in database
GPG Key ID: EC61C5F01750ED3C

View File

@ -345,9 +345,12 @@ class BasicEntityPersister implements EntityPersister
. ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
$types = [];
foreach ($identifier as $fieldName) {
$types[] = $versionedClass->fieldMappings[$fieldName]['type'];
foreach ($id as $field => $value) {
foreach ($this->getTypes($field, $value, $versionedClass) as $type) {
$types[] = $type;
}
}
$flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id);
$value = $this->conn->fetchColumn($sql, array_values($flatId), 0, $types);