java spring mongodb elemMatch用法
java 使用spring框架查询方法
Criteria.where("products").elemMatch(Criteria.where("status").is(1).and("productId").is(channelId))
对应的查询语句
db.tableName.find({"products":{"$elemMatch":{"productId":"4fa7367089cc56e4083cb7a8","status":1}}})
猜你喜欢
转载自jiangdaofeng.iteye.com/blog/1567140
今日推荐
周排行