Hello Everyone!
I have same problem when I can try create a model or all-models with DevTools in a project using PostgreSQL. Really I don't know if the problem is in the code or devtools. On the other hand, I post my files:
Config.php
return new \Phalcon\Config(array(
'database' => array(
'adapter' => 'Postgresql',
'host' => 'localhost',
'username' => 'postgres',
'password' => 'xxxxx',
'dbname' => 'robots_1n',
//'charset' => 'utf8',
),
'application' => array(
'controllersDir' => __DIR__ . '/../../app/controllers/',
'modelsDir' => __DIR__ . '/../../app/models/',
'viewsDir' => __DIR__ . '/../../app/views/',
'pluginsDir' => __DIR__ . '/../../app/plugins/',
'libraryDir' => __DIR__ . '/../../app/library/',
'cacheDir' => __DIR__ . '/../../app/cache/',
'baseUri' => '/article2/',
)
));
Services.php
$di->set('db', function() use ($config) {
$dbclass = 'Phalcon\Db\Adapter\Pdo\\' . $config->database->adapter;
return new $dbclass(array(
"host" => $config->database->host,
"username" => $config->database->username,
"password" => $config->database->password,
"dbname" => $config->database->name
));
});
PD: I'm using DevTools in SO Windows.
Thanks so much! If anybody can help me