【发布时间】:2016-11-06 22:33:52
【问题描述】:
关于使用 mongoose find 的条件,例如
var condition= $and:[{'Credentials.UserName' : 'param.uName'},
{'Credentials.Password' : 'param.Pwd'}]
Here param.uName and param.Pwd are actual values entered by the user, which is set within inverted comma programatically.
它返回 mongodb 表中的所有记录。
关于使用
.findOne({condition},schema,(err,data){
res.send(data)
})
它总是每次都返回第一行。
我确定我错过了一些东西。它在哪里/它是什么?
我是猫鼬的新手。提前致谢。 爱德华
【问题讨论】:
-
嗨@EdwardVarghese,我也面临同样的问题,如果您找到解决方案,请告诉我。
标签: node.js typescript mongoose find