'components' => array(
'mongodb' => array(
'class' => 'common\extentions\MongoDB',
'connectionString' => 'mongodb://localhost:27017/db1',
'dbName' => 'db1',
'fsyncFlag' => false,
'persistentConnection' => 'x',
'replicaSet' => false,
'safeFlag' => true,
'useCursor' => false,
),
'mongodb2' => array(
'class' => 'common\extentions\MongoDB',
'connectionString' => 'mongodb://localhost:27017/db2',
'dbName' => 'db2',
'fsyncFlag' => false,
'persistentConnection' => 'x',
'replicaSet' => false,
'safeFlag' => true,
'useCursor' => false,
),
)
But how use mongodb2 in query (ex: ->findByAttributes()) i don't know. Please type some example query to mongodb2.
'mongodb2' => array
to
'components' => array and add to models ( ex: User) who extends EMongoDocument: