From 8423ae515bbd741dc4ad5417a8a16537eabb64a7 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 23 Aug 2022 15:39:59 +0200 Subject: [PATCH] Document `BulkOperations` limitations. Closes #4082 --- .../data/mongodb/core/BulkOperations.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/BulkOperations.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/BulkOperations.java index 2808b769d..e0132552b 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/BulkOperations.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/BulkOperations.java @@ -24,10 +24,14 @@ import org.springframework.data.util.Pair; import com.mongodb.bulk.BulkWriteResult; /** - * Bulk operations for insert/update/remove actions on a collection. These bulks operation are available since MongoDB - * 2.6 and make use of low level bulk commands on the protocol level. This interface defines a fluent API to add - * multiple single operations or list of similar operations in sequence which can then eventually be executed by calling + * Bulk operations for insert/update/remove actions on a collection. Bulk operations are available since MongoDB 2.6 and + * make use of low level bulk commands on the protocol level. This interface defines a fluent API to add multiple single + * operations or list of similar operations in sequence which can then eventually be executed by calling * {@link #execute()}. + *

+ * Bulk operations are issued as one batch that pulls together all insert, update, and delete operations. Operations + * that require individual operation results such as optimistic locking (using {@code @Version}) are not supported and + * the version field remains not populated. * * @author Tobias Trelle * @author Oliver Gierke