dimanche 29 mars 2015

No adapter set exception when setting multiple connections in li3

I am attempting to set-up multiple connections in my li3 project but when I do I get an uncaught exception. I set my connections in the app/confi/bootstrap/connections.php file which is then loaded in by the bootstrap.php file. Here is what I have for my connections:



Connections::add('default', array(
'development' => array(
'type' => 'MongoDb',
'host' => 'localhost',
'database' => 'web_app'
),
'test' => array(
'type' => 'MongoDb',
'host' => 'localhost',
'database' => 'test_web_app'
)
)
);


When I have it set like this and try to browse to my project I get this error:



Fatal error: Uncaught exception 'lithium\core\ConfigException' with message 'No adapter set for configuration in class `lithium\data\Connections`.' in /var/www/site/libraries/lithium/core/Adaptable.php:233


However when I just have a single default connection set-up it works fine. Has anyone else ran into this issue?





Aucun commentaire:

Enregistrer un commentaire