Add border between two documents in ArangoDB
It should be a simple control, but I can't seem to find how to achieve this. I have two documents from different collections and now I want to link them using the new Edge from the existing collection. I am trying to use the edge-collection.save function like this,
edge-collection.save(FOR s IN Sy
FILTER s._key=403560128,FOR i IN Im
FILTER i._key=353031872, points)
but it doesn't work. How can i do this?
source to share
edge-collection.save()
does not expect execution of the AQL statements you are trying to insert. It expects initial _id
to and from attributes and as its parameter a JSON object containing additional data for the edge. To keep the edge described in your example, you can run the following command:
edge-collection.save("Sy/403560128", "Im/353031872", points);
^^^^^ ^^^^^ ^^^^
sourceId targetId JSON
source to share