It`s hard to take Select Where from nodebb using MongoDb
-
I just want to select users id, where "fbid" not equal " "(is exists).
I try in mongo shell executedb.objects.find({_key:"users:uid"}, {fbid: {$ne: ""}})
Error: error: {
"waitedMS" : NumberLong(0),
"ok" : 0,
"errmsg" : "Unsupported projection option: fbid: { $ne: "" }",
"code" : 2
}and
db.objects.find({_key:"users:uid"}, {$where:"this.fbid != ''"})
show me nothing. What am I doing wrong? thx in advise.
-
@dread said in It`s hard to take Select Where from nodebb using MongoDb:
db.objects.find({_key:"users:uid"}, {fbid: {$ne: ""}})
Try
db.objects.find({_key: /^user:\d+/, fbid: {$ne:""}})
and
db.objects.find({_key: /^user:\d+/, fbid: {$exists:true}})
Copyright © 2024 NodeBB | Contributors