From 0f4951697f6d5ab9e306b30e43487d6b0ddd1d04 Mon Sep 17 00:00:00 2001 From: Richard Smedley Date: Thu, 10 Apr 2025 17:30:45 +0100 Subject: [PATCH] upsert fix --- modules/hello-world/pages/start-using-sdk.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/hello-world/pages/start-using-sdk.adoc b/modules/hello-world/pages/start-using-sdk.adoc index 6a57168b..f6de832f 100644 --- a/modules/hello-world/pages/start-using-sdk.adoc +++ b/modules/hello-world/pages/start-using-sdk.adoc @@ -33,7 +33,8 @@ but first let's look at those data operations, and installing the {name-sdk}. [source,java] ---- -include::devguide:example$java/Overview.java[tag=overview,indent=0] +collection.upsert("my-document", JsonObject.create().put("doc", true), + upsertOptions().durability(DurabilityLevel.MAJORITY)); ---- `upsert` inserts (creates) the document if it does not exist, or replaces it if it does.