i was able to add an edge in DSE graph using the native api from java. but when i try to add the edge using the fluent api in java, it doesnt work. i went through the documentation for fluent api and there was nothing to show how to add an edge. When i try to add the edge in java it gives a run time error telling Edge cannot be added
is there any way to add an edge using the fluent api from java
want to use the fluent api since it is more readable from the java code
Sample Code:
lets say there is a vertex called user. another vertex called movie. i want an edge between user and movie. this is what i am trying in java. i am able to add the vertex (the code shows adding only one vertex ) and it worked fine. not really sure about the edge part , when i try to add the edge i get the run time error
GraphTraversal<Vertex,Vertex> traversal = g.addV("user").property("name",
"abcd");
GraphStatement graphStatement = DseGraph.statementFromTraversal(traversal);
GraphResultSet grs = dseSession.executeGraph(graphStatement);
Vertex user1 = g.V().has("user","name","abcd").next();
g.V().has("movie","name","movie1").next().addEdge("ratedBy",user1)