mongo 问题汇总

1.No converter found capable of converting from type [java.lang.Integer] to type [org.bson.types.ObjectId]

解决方案:聚合分组时group(...)加分组字段
分析:
单个分组字段:
{ "$group" : { "_id" : "$uid" , "updateTime" : { "$max" : "$updateTime"}}}
多个分组字段:
{ "$group" : { "_id" : { "uid" : "$uid" , "operationId" : "$operationId"} , "updateTime" : { "$max" : "$updateTime"}}}

猜你喜欢

转载自blog.csdn.net/wxd772113786/article/details/103107639