I am getting trouble with creating nodes and relationship. I can create two nodes with a relationship by using java code below:
URI Node1 = add.createNode();
URI Node2=add.createNode();
URI relation1 = add.addRelationship(Node1,Node2, "wasGeneratedBy", "{}");
add is created previously.
But if I have node2 already in the Neo4j Graph database, and I just want to create a new node1 and a new relationship then connect to the Node2 inside the Neo4j, how to make this happen?
node2
, then pass it into theaddRelationship
– Nicholas