Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.2
-
Fix Version/s: None
-
Component/s: Query
-
Labels:None
-
Environment:Windows Vista, Apache 2.2, PHP 5.3, MySQL 5.1
Description
I have a custom hydrator that extends Doctrine_Hydrator_ScalarDriver, for the sole purpose of simplifying the column keys (by passing false as the 3rd parameter on _gatherRowData):
class Doctrine_Hydrator_AssocDriver extends Doctrine_Hydrator_ScalarDriver
{
public function hydrateResultSet($stmt)
{
$cache = array();
$result = array();
while ($data = $stmt->fetch(Doctrine_Core::FETCH_ASSOC))
{ $result[] = $this->_gatherRowData($data, $cache, false); } return $result;
}
}
The processPendingFields method in Doctrine_Query is unnecessarily throwing a Doctrine_Query_Exception at line 465. This can be resolved by skipping hydration methods that extend None, Scalar and SingleScalar.
A diff of the changes is attached.