1
0
mirror of synced 2025-03-21 07:23:55 +03:00

fixed DDC-1895

This commit is contained in:
Bart van den Burg 2012-07-02 15:33:20 +02:00 committed by Bart van den Burg
parent 1023af6a1f
commit 64904c77c1

View File

@ -384,7 +384,19 @@ class BasicEntityPersister
$targetMapping = $this->_em->getClassMetadata($this->_class->associationMappings[$idField]['targetEntity']);
$where[] = $this->_class->associationMappings[$idField]['joinColumns'][0]['name'];
$params[] = $id[$idField];
$types[] = $targetMapping->fieldMappings[$targetMapping->identifier[0]]['type'];
switch (true) {
case (isset($targetMapping->fieldMappings[$targetMapping->identifier[0]])):
$types[] = $targetMapping->fieldMappings[$targetMapping->identifier[0]]['type'];
break;
case (isset($targetMapping->associationMappings[$targetMapping->identifier[0]])):
$types[] = $targetMapping->associationMappings[$targetMapping->identifier[0]]['type'];
break;
default:
throw ORMException::unrecognizedField($targetMapping->identifier[0]);
}
} else {
$where[] = $this->quoteStrategy->getColumnName($idField, $this->_class, $this->_platform);
$params[] = $id[$idField];