Description
EDIT: the original question is wrong, but see the comment...
Hi, I'm not sure if this is a bug or if I'm doing something wrong. It seems that the keepNull option of the updateDocument() has no effect now - the uninitialized fields of my object are always removed, no matter the value of keepNull. My object is something like
public class TaxEnt extends NamedDBNode implements ResultItem {
protected Integer rank;
protected String annotation;
protected String sensu;
protected String author;
...
}
Then I make newTaxEnt whose rank field is null, and update it like
database.collection(node.getColletion()).updateDocument(node.getDBKey(), newTaxEnt, new DocumentUpdateOptions().keepNull(false))
The rank field is always removed, no matter if I use keepNull(false) or keepNull(true)... this also happens with the Strings.
And I know it was there, as returning the old object yields
{"oldRev":"_UCCVtCO---","oldDocument":{"rank":200,"annotation":"","sensu":"","author":"ccc","current":true,"isSpeciesOrInf":true,"name":"Aaa bbtaa","_id":"taxent/1489743447570","_key":"1489743447570"},"key":"1489743447570","id":"taxent/1489743447570","rev":"_UCCXXMq---"}
Let me know if you can you replicate this issue. This piece of code was working before I migrated to the new driver. My ArangoDB is 3.1.0.
Best,
Miguel