There is a fix that i made to fix the problem, but i am not sure how it will reflect on the performance. But as far as i can see and understand the logic i don't see where else it could be.
in the class ObjectHydrator in privet function _initRelatedCollection
on line 164 you make a check if collection is set to be refreshed or it is fetched but not initialized.
else if (isset($this->_hints[Query::HINT_REFRESH]) ||
isset($this->_hints['fetched'][$class->name][$fieldName]) &&
! $value->isInitialized()) {
$value->setDirty(false);
$value->setInitialized(true);
$value->unwrap()->clear();
$this->_initializedCollections[$oid . $fieldName] = $value;
}
The problem that i see here is in the second part when the collection is not initialized and i think that is the reason for the problem so my solution si
else if (isset($this->_hints[Query::HINT_REFRESH]) ||
isset($this->_hints['fetched'][$class->name][$fieldName]) &&
! $value->isInitialized()) {
$value->setDirty(false);
/**
* $value->setInitialized(true);
* $value->unwrap()->clear();
* Fix by Victor on 02/03/2011
* With only that code the collection doesn't get initialized
*/
$value->initialize();
$this->_initializedCollections[$oid . $fieldName] = $value;
}
There is a fix that i made to fix the problem, but i am not sure how it will reflect on the performance. But as far as i can see and understand the logic i don't see where else it could be.
in the class ObjectHydrator in privet function _initRelatedCollection
on line 164 you make a check if collection is set to be refreshed or it is fetched but not initialized.
The problem that i see here is in the second part when the collection is not initialized and i think that is the reason for the problem so my solution si