I want to remove an attribute from a document in ArangoDB.
I thought the correct method for this was with the function UNSET(doc, attributeName1, ..., attributeNameN)
. However, with this alone, nothing is changed in the database.
Example:
let target_key = "42"
FOR doc IN myCollection
FILTER doc._key == target_key
RETURN UNSET(doc, "myAttribute")
The example returns the original document without the attribute myAttribute
, but the new version is not saved to the database, so it seems this is only a projected copy.