Browse Source

Fix test

labs/manual-encryption
Christoph Strobl 3 years ago
parent
commit
d94d273010
No known key found for this signature in database
GPG Key ID: 8CC1AB53391458C8
  1. 9
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoTemplate.java

9
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoTemplate.java

@ -1569,14 +1569,9 @@ public class ReactiveMongoTemplate implements ReactiveMongoOperations, Applicati @@ -1569,14 +1569,9 @@ public class ReactiveMongoTemplate implements ReactiveMongoOperations, Applicati
deferredFilter = Mono
.from(
collection.find(filter, Document.class).projection(updateContext.getMappedShardKey(entity)).first())
.zipWith(replacement)
//.defaultIfEmpty(replacement)
.switchIfEmpty(replacement)
.map(it -> {
if(it.getT1() == null) {
return updateContext.applyShardKey(entity, filter, it.getT2());
} else {
return updateContext.applyShardKey(entity, filter, it.getT1());
}
return updateContext.applyShardKey(entity, filter, it);
});
}
} else {

Loading…
Cancel
Save