ZF-6620: Zend_Application Db Resource - set fetch mode via config
Description
At the moment I have to do something like this to fetch objects rather than arrays from the database
protected function _initFetch(){
$this->bootstrap('db');
$db = $this->getResource('db');
$db->setFetchMode(Zend_Db::FETCH_OBJ);
}
It would be great if the existing Db resource could take another config line like this
resources.db.fetchMode = 5
Comments
Posted by Clement Roux (stealth35) on 2010-09-26T12:30:51.000+0000
hi, try this patch : http://backfront.org/patch/…
;)
Posted by Ramon Henrique Ornelas (ramon) on 2010-09-26T16:46:16.000+0000
Improvement in patch and was added tests units.
Posted by Ramon Henrique Ornelas (ramon) on 2010-09-26T20:52:27.000+0000
Patch v2 validation of fetch_mode supported by adapters.
Posted by Ramon Henrique Ornelas (ramon) on 2010-10-20T19:10:58.000+0000
Fixed in trunk r23192, applied to release branch 1.11 r23193.