I try to add a new node to an existing graph in neo4j, and try to create a mapping between the new node(BAI09.03) and an existing node(PR.IP-6) but am getting it like this
but my output should be like this
I try to add a new node to an existing graph in neo4j, and try to create a mapping between the new node(BAI09.03) and an existing node(PR.IP-6) but am getting it like this
but my output should be like this
There must be something wrong in your query :)
I suspect you do a MERGE to find your PR.IP-6 node, but you provide a property value that does not correspond, and then Neo4j will create a new node.
If you can provide the query you use, we can help you further.
You can do like this:
CREATE (s:Sample {sampleNumber: toInteger("1234567")})
WITH s
MATCH (p:Person {personNumber: toInteger("1234")})
CREATE (p)-[:Person_Sample]->(s)
Suppose we have already a node in the neo4j with personNumber: 1234
and we are creating a new node as Sample.