通过此呼叫:
(VOMongoRepository
mongoUrls: {'127.0.0.1:27017' . '127.0.0.1:27018' . '127.0.0.1:27019'}
database: 'myDB'
username: 'myUser'
password: 'myPass') enableReplication
我收到一个VOMongoConnectionError没有任何更深入的信息。
尝试同样的方法:
VOMongoRepository
mongoUrls: {'myUser:myPass@127.0.0.1:27017/?replicaSet=myRepl' }
database: 'myDB'
然后我收到一个VOMongoError“未授权查询”myDB.MyDocument文件"
有趣的是,我的testDocumentLifeCycle能够创建对象并发送一条要保存的消息,该消息返回时不会发出错误信号,尽管它没有在MongoDB中创建文档。但是selectOne:正在返回VOMongoError:
| doc |
MyDocument new
identity: 'me@there.com';
save.
user := MyDocument selectOne: [ :each | each identity = 'me@there.com'].
我只想提一下:上面对MyDocument类的测试在没有启用身份验证的独立mongod上运行。唯一改变的是存储库。
那我做错什么了?