
mongodb
peng179
这个作者很懒,什么都没留下…
展开
-
2020-10-23
springboot 整合mongoDB遇到的问题The dependencies of some of the beans in the application context form a cycle出现此问题的原因是多个类有初始化MongoTemplate导致 : @Autowired private MongoTemplate mongoTemplate;解决办法:加上延迟加载@Lazy处理方法: 在 @Autowired @Lazy...原创 2020-10-23 08:58:05 · 240 阅读 · 1 评论 -
(nodejs )mongodb 更新数据失败... MongoError: After applying the update to the document {_id
MongoError: After applying the update to the document {_id: "895f2731-2122-11e9-8ed4-a30d938050f7" , ...}, the (immutable) field '_id' was found to have been altered to _id: "751c9c90-229d-11e9-826a...原创 2019-01-28 10:41:22 · 4913 阅读 · 0 评论 -
mongodb 批量更新内嵌数组里面的内容
Criteria criteria = Criteria.where("comments.is_read").is(2).and("_id").is(new ObjectId("5cf642b95843667a86c8a6b5")); Aggregation cAggregation = Aggregation.newAggregation( ...原创 2019-06-05 10:56:02 · 1656 阅读 · 0 评论 -
mongoTemplate 批量更新数组里面的值
try{ Criteria fnLikesCriteria = Criteria.where("fnLikes.isRead").is(0); Criteria commentsCriteria = Criteria.where("comments.isRead").is(0); ...转载 2019-06-04 12:23:35 · 5253 阅读 · 1 评论 -
mongodb 内嵌数组分组查询
mongodb 内嵌数组分组查询(数据结构)java 代码:Aggregation aggregation1 = Aggregation.newAggregation( Aggregation.unwind("fnLikes"), Aggregation.match(Criteria.where("user_id...原创 2019-06-04 19:48:12 · 2153 阅读 · 0 评论