[BUG] Не работает \Phalcon\Db::FETCH_CLASS
$sql = 'SELECT DISTINCT pins_tags.* FROM pins_tags;'; $db = $this->di->get('db'); $result = $db->query($sql); $result->setFetchMode(\Phalcon\Db::FETCH_CLASS, 'Pin\Model\PinsTags'); print_r($result->fetchAll());
получаю: Array ( [0] => Array ( [id] => 1 [0] => 1 [pin_id] => 1 [1] => 1 [tag_id] => 1 [2] => 1 ) ...
По поводу \Phalcon\Db::FETCH_CLASS, хоть эта константа и заявлена в Phalcon\Db (http://docs.phalconphp.com/ru/latest/api/Phalcon_Db.h..), но в доках нет ее упоминания - http://docs.phalconphp.com/ru/latest/api/Phalcon_Db_R.. , скорее всего, эта фича еще не поддерживается.
In 1.3.2 branch lack of memory. PHP Fatal error: Allowed memory size of 134217728 bytes exhausted
You find out the result of a lot number? You can set memory_limit value bigger try again.
Hello, if in $result->setFetchMode(\Phalcon\Db::FETCH_CLASS, 'Test'); class test extends from Phalcon\Mvc\Model, i get deficit of memory, and if class test do not extends, all is going well. Now the memory_limit is 128M.