Skip to content

Commit 6a8cb47

Browse files
committed
Testing with setting "null" instead of unset
1 parent 5ab5dbb commit 6a8cb47

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/main/java/picoded/dstack/mongodb/MongoDB_DataObjectMap.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -269,19 +269,14 @@ public void DataObjectRemoteDataMap_update(String _oid, Map<String, Object> full
269269
// Handle NULL values unset
270270
if (value == null || value == ObjectToken.NULL) {
271271
unset_doc.append(key, "");
272+
set_doc.append(key, null);
273+
setOnInsert_doc.append(key, null);
272274
continue;
273275
}
274276

275277
// Handle values update
276278
set_doc.append(key, value);
277279
continue;
278-
} else {
279-
// It seems like for some reason NULL might not be properly triggering the updateKeys?
280-
if (value == null || value == ObjectToken.NULL) {
281-
unset_doc.append(key, "");
282-
set_doc.append(key, null);
283-
setOnInsert_doc.append(key, null);
284-
}
285280
}
286281

287282
// OK - this is not in the update dataset

0 commit comments

Comments
 (0)