From d9510dc158a490852a48c53f44f5a9845fee50a8 Mon Sep 17 00:00:00 2001 From: Subhashni Balakrishnan Date: Mon, 30 Jan 2017 15:53:52 -0800 Subject: [PATCH] DATACOUCH-146 - Use only last emission to create a Mono for delete collection Original pull request: #130. --- .../support/SimpleReactiveCouchbaseRepository.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/data/couchbase/repository/support/SimpleReactiveCouchbaseRepository.java b/src/main/java/org/springframework/data/couchbase/repository/support/SimpleReactiveCouchbaseRepository.java index c78e9a7c..e6a8af30 100644 --- a/src/main/java/org/springframework/data/couchbase/repository/support/SimpleReactiveCouchbaseRepository.java +++ b/src/main/java/org/springframework/data/couchbase/repository/support/SimpleReactiveCouchbaseRepository.java @@ -200,7 +200,10 @@ public class SimpleReactiveCouchbaseRepository imple @Override public Mono delete(Iterable entities) { Assert.notNull(entities, "The given Iterable of entities must not be null!"); - return mapMono(operations.remove(entities).map(res -> Observable.empty()).toSingle()); + return mapMono(operations + .remove(entities) + .last() + .map(res -> Observable.empty()).toSingle()); }