In a reactive spring boot application, I have a list of items to update. I want to send a SINGLE command to my DB to apply the changes on different items. An equivalent to db.collection.updateMany if I may say. Is it possible? How?
In a reactive spring boot application, I have a list of items to update. I want to send a SINGLE command to my DB to apply the changes on different items. An equivalent to db.collection.updateMany if I may say. Is it possible? How?
Yes it is possible, ReactiveMongoTemplate has
updateMulti(Query query, UpdateDefinition update, Class<?> entityClass)
Updates all objects that are found in the collection for the entity class that matches the query document criteria with the provided updated document.