我一直在尝试将以下查询转换为使用Java访问MongoDB中的记录。
db.things.find( {
$and : [
{
$or : [
{"name" : "john"},{"name" : "seena"}
]
},{
"Phone":"12345678"
}
]
} )
以下也使用$ in
db.things.find( {
$and : [
{
name : {$in : [ "john","seena"]}
},{
"Phone":"12345678"
}
]
} )
我尝试了一些示例(Querying MongoDB with And,OR condition),这些示例通过做一些修改就已经在StackOverflow上了。但是我无法做到这一点。