I am using node driver version 6 of arangodb to insert relations between two vertices as follows.
db.collection("starks").save({
_from: "Starks/Lyanna-Stark",
_to: "Starks/Ned-Stark",
type: "married"
});
This inserts relation married
between Starks/Lyanna-Stark
and Starks/Ned-Stark
into the database. But when I run this query twice, it is inserting it two times with different relation key. I want to avoid this as only one entry should be present for a single relation. How can I achieve this ?