1
0
Fork 0
mirror of synced 2025-04-01 12:26:11 +03:00

Corrected TO_ONE check just to be sure.

This commit is contained in:
Roman S. Borschel 2010-08-09 19:34:36 +02:00
parent 8d3e0e61ea
commit 5178f4b7d6

View file

@ -349,7 +349,7 @@ class ObjectHydrator extends AbstractHydrator
// If there is an inverse mapping on the target class its bidirectional
if ($relation['inversedBy']) {
$inverseAssoc = $targetClass->associationMappings[$relation['inversedBy']];
if ($inverseAssoc['type'] == ClassMetadata::ONE_TO_ONE) {
if ($inverseAssoc['type'] & ClassMetadata::TO_ONE) {
$targetClass->reflFields[$inverseAssoc['fieldName']]->setValue($element, $parentObject);
$this->_uow->setOriginalEntityProperty(spl_object_hash($element), $inverseAssoc['fieldName'], $parentObject);
}