【发布时间】:2016-07-18 14:31:00
【问题描述】:
根据文档在“阅读 NoSQL 文档”部分下教 here。
我复制了下面完全相同的代码。
UserModel.find({}, function(error, result) {
if(error) {
console.log("An error happened -> " + JSON.stringify(error));
}
// Do something with the resulting Ottoman models
});
但它给了我错误
TypeError: First argument needs to be a ViewQuery, SpatialQuery or N1qlQuery.
为什么会产生错误?还有ViewQuery、SpatialQuery和N1qlQuery是什么?
【问题讨论】:
-
"上面会找到所有使用 Ottoman UserModel 创建的文档。"您是否使用 Ottoman UserModal 创建过文档?
-
@AlexisCôté 是的,我很确定我的存储桶上有使用 Ottoman 创建的文档。
标签: couchbase couchbase-ottoman ottoman-node