linerwords.blogg.se

Arangodb create edge collection
Arangodb create edge collection









arangodb create edge collection

The reason for this restriction is pretty simple, commerce expects that targets of these edges are users but now finds customers instead.

arangodb create edge collection

This is totally allowed and supported with the simple restriction that isFriend has identical definition in both graphs (it is identical data) and it is forbidden that the second graph says: isFriend is from: to to:

arangodb create edge collection

This means these graphs actually share the same piece of data, same users, same relations between them. want to have another graph that should share the the same edge definition isFriend. We can define the graph ecommerce using hasBought and isFriend.Īnd finally i think we come to the source of your confusion. Say now we have another definition hasBought from:, to. The classical edge collections in ArangoDB do NOT check such conditions on their own.Ī graph takes a list of such edge definitions and makes sure their conditions remain fulfilled. We can use the edge definition isFriend, from:, to: which makes sure only edges from users to users are allowed, edges from users to products will be rejected. I think i have to clarify the concept of the graph definitions a bit more in detail:įirst of all we have the concept of edge definitions:Īn edge definition wraps around one edge collection and adds additional restrictions for the entries in _from and _to.Īs an example let's say we have vertices users and and edges isFriend. I am using 2.7.0 installed through apt on Ubuntu 14.04 Not sure if this is a bug or I am not understanding something but it is a little annoying. Hockey/jr_aaa -> hockey/siskins -> Jon Smithīaseball/house_league -> baseball/royals -> Jon SmithĪnyways the problem is if the hockey graph is the first one I create, when I make the baseball graph and add members to edge definitions it forces the collections to have the hockey collection and I can't change it. I would have one graph mapping the players to hockey teams without showing the base ball connections and another only showing the base ball. They all use the same edge collection (member) but I want each graph to show the edges between different collections.įor example if I have a collection of sports players, hockey teams, and base ball teams. I am using the web interface to define a number of different graphs.











Arangodb create edge collection