[2.0][DDC-171] Fixed.
This commit is contained in:
parent
909e98c6f2
commit
3a39bea9f0
@ -29,7 +29,7 @@ class DebugStack implements SqlLogger
|
||||
|
||||
public function logSql($sql, array $params = null)
|
||||
{
|
||||
if($this->enabled) {
|
||||
if ($this->enabled) {
|
||||
$this->queries[] = array('sql' => $sql, 'params' => $params);
|
||||
}
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ abstract class AbstractHydrator
|
||||
*/
|
||||
private function _lookupDeclaringClass($class, $fieldName)
|
||||
{
|
||||
//FIXME: What if two subclasses declare a (mapped) field with the same name?
|
||||
// FIXME: What if two subclasses declare a (mapped) field with the same name?
|
||||
// We probably need to encode the information to which subclass a field
|
||||
// belongs in the column alias / result set mapping.
|
||||
// This would solve the issue and would probably make this lookup superfluous.
|
||||
|
@ -354,6 +354,7 @@ class ObjectHydrator extends AbstractHydrator
|
||||
}
|
||||
} else {
|
||||
$targetClass->reflFields[$inverseAssoc->sourceFieldName]->setValue($element, $parentObject);
|
||||
$this->_uow->setOriginalEntityProperty(spl_object_hash($element), $inverseAssoc->sourceFieldName, $parentObject);
|
||||
}
|
||||
} else if ($parentClass === $targetClass && $relation->mappedByFieldName) {
|
||||
// Special case: bi-directional self-referencing one-one on the same class
|
||||
@ -362,6 +363,7 @@ class ObjectHydrator extends AbstractHydrator
|
||||
} else {
|
||||
// For sure bidirectional, as there is no inverse side in unidirectional mappings
|
||||
$targetClass->reflFields[$relation->mappedByFieldName]->setValue($element, $parentObject);
|
||||
$this->_uow->setOriginalEntityProperty(spl_object_hash($element), $relation->mappedByFieldName, $parentObject);
|
||||
}
|
||||
// Update result pointer
|
||||
$this->_resultPointers[$dqlAlias] = $element;
|
||||
|
Loading…
x
Reference in New Issue
Block a user