From d4bb217fd27253ad57daac89d7eb464d41f50aba Mon Sep 17 00:00:00 2001 From: mikereiche Date: Wed, 8 Mar 2023 18:31:34 -0800 Subject: [PATCH] Pass cas from oneEntity call to one by id. Closes #1388. --- .../data/couchbase/core/ReactiveRemoveByIdOperationSupport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/data/couchbase/core/ReactiveRemoveByIdOperationSupport.java b/src/main/java/org/springframework/data/couchbase/core/ReactiveRemoveByIdOperationSupport.java index 2e7427f27..7e45b2cfe 100644 --- a/src/main/java/org/springframework/data/couchbase/core/ReactiveRemoveByIdOperationSupport.java +++ b/src/main/java/org/springframework/data/couchbase/core/ReactiveRemoveByIdOperationSupport.java @@ -157,7 +157,7 @@ private void rejectInvalidTransactionalOptions() { public Mono oneEntity(Object entity) { ReactiveRemoveByIdSupport op = new ReactiveRemoveByIdSupport(template, domainType, scope, collection, options, persistTo, replicateTo, durabilityLevel, template.support().getCas(entity)); - return op.one(template.support().getId(entity).toString()); + return op.withCas(template.support().getCas(entity)).one(template.support().getId(entity).toString()); } @Override