Mutiple Upsert in Couchbase SDK 3

Your example would look like this in SDK3:

        MutateInResult result = collection.mutateIn(campaignEntity.getId(), Arrays.asList(
                MutateInSpec.upsert("a", entity.getA),
                MutateInSpec.upsert("b", entity.getB)));

1 Like