Skip to content

Commit 3cfd0f7

Browse files
author
mpv1989
committed
Fix issue #180
ArangoCollection.updateDocuments() ignoring DocumentUpdateOptions.serializeNull
1 parent b365b95 commit 3cfd0f7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ v4.3.8 (2018-xx-xx)
44
* changed dependency com.arangodb:velocypack to 1.0.15
55
* fixed DateUtil does incorrect conversion of UTC time
66
* fixed reconnecting after ArangoDB restarts (issue #186)
7+
* fixed ArangoCollection.updateDocuments() ignoring DocumentUpdateOptions.serializeNull (issue #180)
78

89
v4.3.7 (2018-04-17)
910
---------------------------

src/main/java/com/arangodb/internal/InternalArangoCollection.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,10 @@ protected <T> Request updateDocumentsRequest(final Collection<T> values, final D
394394
request.putQueryParam(ArangoDBConstants.RETURN_NEW, params.getReturnNew());
395395
request.putQueryParam(ArangoDBConstants.RETURN_OLD, params.getReturnOld());
396396
request.putHeaderParam(ArangoDBConstants.IF_MATCH, params.getIfMatch());
397-
request.setBody(
398-
util().serialize(values, new ArangoSerializer.Options().serializeNullValues(false).stringAsJson(true)));
397+
request.setBody(util().serialize(values,
398+
new ArangoSerializer.Options()
399+
.serializeNullValues(params.getSerializeNull() == null || params.getSerializeNull())
400+
.stringAsJson(true)));
399401
return request;
400402
}
401403

0 commit comments

Comments
 (0)