Closed metola closed 3 years ago
Also need a line for CHANGELOG.md
i think it is not a good way, because a variety of mongodb connection string patterns exist.(Standalone & Replica Set & Shard).
the defaultDatabaseName
parameter is required for better performance and compatibility.
https://docs.mongodb.com/manual/reference/connection-string/
Hi @ziaratban , what do you think is the best way to approach it?
hi @metola , I think the best solution is to not customize this part. this part must be set by programmer.
return [
'class' => 'yii\mongodb\Connection',
'dsn' => 'mongodb://any syntax',
'defaultDatabaseName' => 'myDB', // <<<< required
'enableLogging' => YII_ENV === 'dev',
'enableProfiling' => YII_ENV === 'dev',
];
Hi @ziaratban , Thanks, with this worlk well.
Fix issue #304 This is need if you create a cloud cluster https://cloud.mongodb.com/ and need conection mongodb+srv