Details
Description
There seems to be no possibility to update an existing value to null on a document.
The following snippet will fail with an IllegalArgumentException.
//connect to Cluster
|
...
|
|
JObject o = JObject.FromObject(new |
{
|
title = "Sample", |
description = (string)null |
});
|
await _Collection.InsertAsync<JObject>("test", o); |
|
static void temp(MutateInSpecBuilder specs) |
{
|
//any of the following lines will fail |
specs.Remove("title").Insert<string>("title", null); |
specs.Insert<string>("newKey", null, true); |
specs.Upsert<string>("title", null, true); |
}
|
await _Collection.MutateInAsync("test", temp); |
I could not find any documentation that setting value to null is not supported.
Issue https://issues.couchbase.com/browse/NCBC-2038 states, it seems supported for sub-documents
Attachments
For Gerrit Dashboard: NCBC-2746 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
141936,3 | NCBC-2746: MutateIn Remove or NULL specs fail with IllegalArgumentException | master | couchbase-net-client | Status: MERGED | +2 | +1 |