{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/10475","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10475/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10475/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10475/events","html_url":"https://github.com/phalcon/cphalcon/issues/10475","id":85500987,"number":10475,"title":"How to change DB FetchMode in DbAdapter ?","user":{"login":"chakravarthy28","id":6682671,"avatar_url":"https://avatars.githubusercontent.com/u/6682671?v=3","gravatar_id":"","url":"https://api.github.com/users/chakravarthy28","html_url":"https://github.com/chakravarthy28","followers_url":"https://api.github.com/users/chakravarthy28/followers","following_url":"https://api.github.com/users/chakravarthy28/following{/other_user}","gists_url":"https://api.github.com/users/chakravarthy28/gists{/gist_id}","starred_url":"https://api.github.com/users/chakravarthy28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chakravarthy28/subscriptions","organizations_url":"https://api.github.com/users/chakravarthy28/orgs","repos_url":"https://api.github.com/users/chakravarthy28/repos","events_url":"https://api.github.com/users/chakravarthy28/events{/privacy}","received_events_url":"https://api.github.com/users/chakravarthy28/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-05T10:26:00Z","updated_at":"2015-06-05T11:42:38Z","closed_at":null,"body":"Hi \r\nHow can i set default fetch mode in DbAdapter is it Possible\r\n\r\n$di->set('db', function () use ($config) {\r\n    return new DbAdapter(array(\r\n        'host' => $config->database->host,\r\n        'username' => $config->database->username,\r\n        'password' => $config->database->password,\r\n        'dbname' => $config->database->dbname\r\n    ));\r\n});"},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/109266480","html_url":"https://github.com/phalcon/cphalcon/issues/10475#issuecomment-109266480","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10475","id":109266480,"user":{"login":"chakravarthy28","id":6682671,"avatar_url":"https://avatars.githubusercontent.com/u/6682671?v=3","gravatar_id":"","url":"https://api.github.com/users/chakravarthy28","html_url":"https://github.com/chakravarthy28","followers_url":"https://api.github.com/users/chakravarthy28/followers","following_url":"https://api.github.com/users/chakravarthy28/following{/other_user}","gists_url":"https://api.github.com/users/chakravarthy28/gists{/gist_id}","starred_url":"https://api.github.com/users/chakravarthy28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chakravarthy28/subscriptions","organizations_url":"https://api.github.com/users/chakravarthy28/orgs","repos_url":"https://api.github.com/users/chakravarthy28/repos","events_url":"https://api.github.com/users/chakravarthy28/events{/privacy}","received_events_url":"https://api.github.com/users/chakravarthy28/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T11:42:37Z","updated_at":"2015-06-05T11:42:37Z","body":"Thanks. please help me\r\nIf using object to find records. query like     \r\n$settings = Settings::find(\r\n            array(\r\n        \"conditions\" => \"status = 1\"\r\n    ));\r\nwhen i print the result, it display \r\nPhalcon\\Mvc\\Model\\Resultset\\Simple Object\r\n(\r\n    [_type:protected] => 1\r\n    [_result:protected] => Phalcon\\Db\\Result\\Pdo Object\r\n        (\r\n            [_connection:protected] => Phalcon\\Db\\Adapter\\Pdo\\Mysql Object\r\n                (\r\n                    [_eventsManager:protected] => \r\n                    [_descriptor:protected] => Array\r\n                        (\r\n                            [host] => localhost\r\n                            [username] => root\r\n                            [password] => root\r\n                            [dbname] => pezydir\r\n                            [options] => Array\r\n                                (\r\n                                    [19] => 2\r\n                                )\r\n\r\n                        )\r\n\r\n                    [_dialect:protected] => Phalcon\\Db\\Dialect\\Mysql Object\r\n                        (\r\n                            [_escapeChar:protected] => `\r\n                        )\r\n\r\n                    [_connectionId:protected] => 1\r\n                    [_sqlStatement:protected] => \r\n                    [_sqlVariables:protected] => \r\n                    [_sqlBindTypes:protected] => \r\n                    [_transactionsWithSavepoints:protected] => 0\r\n                    [_pdo:protected] => PDO Object\r\n                        (\r\n                        )\r\n\r\n                    [_affectedRows:protected] => \r\n                    [_transactionLevel:protected] => 0\r\n                    [_type:protected] => mysql\r\n                    [_dialectType:protected] => mysql\r\n                )\r\n\r\n            [_result:protected] => \r\n            [_fetchMode:protected] => 2\r\n            [_pdoStatement:protected] => PDOStatement Object.........\r\n\r\nwhy its not coming like this\r\n\r\nstdClass Object\r\n(\r\n    [Id] => 1\r\n    [Postcode] => AB101AA\r\n    [Latitude] => 57.148235000000000\r\n    [Longitude] => -2.096648000000000\r\n    [GridRef] => NJ942063\r\n    [County] => \r\n    [District] => Aberdeen City\r\n    [Ward] => George St/Harbour\r\n    [Country] => Scotland\r\n    [Region] => Aberdeen North\r\n)\r\n\r\nwhy its getting lot of objects in it  [_dialect:protected] => Phalcon\\Db\\Dialect\\Mysql Object\r\n\r\nhow to stop this ?\r\n"}}