microsoft / spring-data-gremlin

We are in the process of deprecating Spring Data Gremlin. -- Provide generic annotation oriented programming form based on gremlin for graph database
Other
129 stars 76 forks source link

There is no API for getting edge information through nodes #214

Closed black-pearl45 closed 3 years ago

black-pearl45 commented 5 years ago

There is no API for getting edge information through nodes

Incarnation-p-lee commented 5 years ago

Thanks for issue this. Yes, it is not support yet. We may plan to add that in future.

TeVexo commented 5 years ago

You could save a list in the Vertex with all outgoing edges and one with all incoming edges as Objects to solve this issue. Those list could also have an annotation like "@OutEdges" and "@InEdges". With this it is possible to "walk" through the graph.

But it would be preferable just to save the gremlin ids of the edges in those lists. And also change the edge annotation "@EdgeFrom" and "@EdgeTo" to store only the vertex ids. Then you can get the Vertex/Edge objects by using the "findById()"-method.

In the moment one edge can only be used with two pre defined vertex types. If you use the method with the id instead of the object an edge could also be used to connect to totaly different types of vertices.

Incarnation-p-lee commented 5 years ago

@TeVexo Thanks for information, if property list works well as expected, that should be better solution for this. We do not involve that feature for now as we still investigate one better way to user experience. Thanks again for this.

chenrujun commented 3 years ago

Closing this issue. Because it's not active for a long time. If anyone have similar issue, please create issue in new repo: https://github.com/Azure/azure-sdk-for-java/issues