mongodb - ReactiveMongo with Play 2.3 -
i'm working on play 2.3 reactivemongo. want query db should search id , name or mobile number. ever matches among name , mobile number.
the query in db level worked follows.
db.enduser.find({$and:[{businessuserid:"1"},{ $or: [{name:"ruthvick"},{mobilenumber:"989"}]}]})
but same write per play syntax not fetching result. query in scala didn't work follows.
val cursor: cursor[jsobject] = collectionenduser.find( json.obj("$and"->json.arr(json.obj("businessuserid"->"", "$or"->json.arr(json.obj("name"->"ruthvick", "mobilenumber"->"9686563240"))))) ).cursor[jsobject]
kindly review query , me necessary changes.
thanks
Comments
Post a Comment