I am new to Neo4j and SDN . I was trying to create a primary key for my entities using @Indexed(unique=true). It creates unique nodes but will replace the other properties if i used the same property value which is indexed. Eg:
Class abc{
@Indexed(unique=true)
Long abc_id;
String abc_name;
}
new abc(1,"asd")// creates node with id: 1 name : asd
new abc(1,"xyz")// replaces asd with xyz .
However I want to throw an exception about primary key violation/duplicate node.
Is there some method to achieve the same?