Affects Version/s: None
Fix Version/s: None
Environment:OS : Ubuntu 9.04
PHP : PHP 5.2.6-3ubuntu4.5
Description : Upon hydrating as array I will receive one row returned. If I am to hydrate as Scalar, I will get 200+ rows. Also, if i echo the sql ($q->getSqlQuery()) and run that raw, it will also return around 200+ rows.
$q = Doctrine_Query::create()
->select('DISTINCT(co.name) AS field, co.name AS value')
//here we will get only the first row
$results = $q->execute(array(), Doctrine::HYDRATE_ARRAY);
//Here we will get all 200+ rows
$results = $q->execute(array(), Doctrine::HYDRATE_SCALAR);
I have yet to dig to deep into this, but if it is indeed a bug, my guess is it is in Doctrine_Hydrator_Graph::hydrateResultSet()
I can provide more data if needed.