All,
Just "playing" with node and neo4j.
I have managed to save two nodes with a relationship between them.
so I have :
var data1 = {
prop1: somevalue1,
prop2: somevalue1
}
var data2 = {
prop1: somevalue2,
prop2: somevalue2
}
var node1 = db.createNode(data1);
var node2 = db.createNode(data2);
node1.save( _ );
node2.save( _ );
node1.createRelationshipTo(node2, 'SomeRelationship', {}, _ );
I would like to do the same thing however I would like to ensure that if a new node is created it is unique, is there a simple way to do this ?