mongodb find 查询报错
滿天的星座
滿天的星座 2017-04-27 09:02:35
0
2
566

在mongo 命令行下执行如下查询

db.users.find({})

能正常的读取集合中的所有数据,
但是执行如下查询命令,则报错

db.users.find({loginname:'test'})
error: {
    "$err" : "Unable to execute query: error processing query: ns=im.users limit=0 skip=0\nTree: loginname == \"lidian\"\nSort: {}\nProj: {}\n No query solutions",
    "code" : 17007
}

mongodb 配置的副本集(Replica Set)

滿天的星座
滿天的星座

reply all(2)
淡淡烟草味
  • There is no problem with the query statement. There should be an error somewhere else. Create a new table and test it

仅有的幸福

General query, no problem.

It’s no problem to check one.

Sir, you can check if there is a loginname field in your user collection.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template