我需要使用 Java Spring mongoTemplate 中的 $where 运算符查询数据库。这是查询:
db.myCollection.find( {$where : function () {
for (var index in this.*someKey*){
if (index.indexOf(*someValue*) > -1){
return this;
}
}
}})
但是操作员期望接收密钥的 mongoTemplate 不是 java 脚本字符串函数。有没有办法解决?