-
Notifications
You must be signed in to change notification settings - Fork 330
Description
Hi,
I have managed to compile and get the friends example working, so I think I have more or less understood how to represent 1 to many relationship in TSL. However its not entirely clear for me how to represent the edges where I have a single node type which can have 5 different edge types connecting the nodes. Both the nodes and the edges hold data.
So e.g. I can have
cell struct myNode
{
string name;
string owner;
list<long> edges;
}
cell struct myEdge
{
long StartNode;
long EndNode;
int8 EdgeType;
float weight;
string sourcePath;
}
which lets me find the start and end myNodes given any myEdge and lets me get the list of myEdges for a given myNode. However its less friendly to then get from a given myNode only those myEdges which have a certain edgeType.
Is there a better way to structure this to make this kind of query more direct? Not every myNode has every edge type and there may be multiple myEdges of a given type connected between two myNodes
Thanks in advance for any help you can offer.