1
0
Fork 0

We now need to specify _from and _to for edges, since they're part of the regular document now and mandatory.

This commit is contained in:
Wilfried Goesgens 2016-05-23 15:20:29 +02:00
parent d549d56199
commit 6f5bfd94a3
1 changed files with 2 additions and 2 deletions

View File

@ -849,7 +849,7 @@ the edge will not be stored.
Replaces the data of an edge in collection edgeCollectionName
Replaces the data of an edge in collection edgeCollectionName. Note that `_from` and `_to` are mandatory.
`graph.edgeCollectionName.replace(edgeId, data, options)`
@ -869,7 +869,7 @@ Replaces the data of an edge in collection edgeCollectionName
var examples = require("@arangodb/graph-examples/example-graph.js");
var graph = examples.loadGraph("social");
graph.relation.save("female/alice", "female/diana", {typo: "nose", _key: "aliceAndDiana"});
graph.relation.replace("relation/aliceAndDiana", {type: "knows"});
graph.relation.replace("relation/aliceAndDiana", {type: "knows", _from: "female/alice", _to: "female/diana"});
~ examples.dropGraph("social");
@END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock generalGraphEdgeCollectionReplace