Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在反应式 Spring Boot 应用程序中,我有一个要更新的项目列表。我想向我的数据库发送一个 SINGLE 命令以将更改应用于不同的项目。如果我可以说,相当于 db.collection.updateMany。可能吗?如何?
是的,有可能,ReactiveMongoTemplate 有
updateMulti(Query query, UpdateDefinition update, Class<?> entityClass)
使用提供的更新文档更新在集合中找到的与查询文档条件匹配的实体类的所有对象。