1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Added a fix in toArray method to prevent mapped Doctrine_Record values to be displayed fully

This commit is contained in:
guilhermeblanco 2008-01-17 13:26:31 +00:00
parent dca3c3b701
commit af32f80176

View File

@ -1251,7 +1251,16 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
}
}
return array_merge($a, $this->_values);
// [FIX] Prevent mapped Doctrine_Records from being displayed fully
foreach ($this->_values as $key => $value) {
if ($value instanceof Doctrine_Record) {
$a[$key] = $value->toArray($deep, $prefixKey);
} else {
$a[$key] = $value;
}
}
return $a;
}
/**