Closed hasithajayasundara closed 2 years ago
i think thats intended behavior... maybe modify the js object to have person: {}
then replace the object in the database?
Update does a "merge" by default. You probably want to set mergeObjects
to false
: http://arangodb.github.io/arangojs/7.5.0/modules/_collection_.html#collectionupdateoptions
@pluma @autumnblazey thanks for the replies. mergeObjects to false
resolved the issues. Closing this.
I have modified this test as follows to illustrate what I was trying to do.
Idea is I'm trying to update the
person
to{}
which holds a value of{ info: { name: "Jane", age: "10"} } }
.Issue
collection.update
does not update the person entry to {} but keeps the old valueinfo: { name: "Jane", age: "10"} }
.