springboot + MongoTemplate 操作mongodb库,在使用in查询时因为查询字段在表里面为下划线格式,查询报错。
字段名如下:uni_openid ,查询语句如下:Criteria condition3 = Criteria.where("uni_openid").in(array);
报错如下:org.springframework.data.mapping.PropertyReferenceException: No property uni found for type UserPick! Did you mean 'uid'?
这里要声明一下 我表里面是有这个字段的,表对应的实体类也是有这个属性的。