As per the documentation teaches here under "Reading NoSQL Documents" part.
I copied the exact same code below.
UserModel.find({}, function(error, result) {
if(error) {
console.log("An error happened -> " + JSON.stringify(error));
}
// Do something with the resulting Ottoman models
});
But it's giving me the error
TypeError: First argument needs to be a ViewQuery, SpatialQuery or N1qlQuery.
Why is it producing the error? And what are ViewQuery
, SpatialQuery
and N1qlQuery
?