I am trying to create a relationship between two nodes in neo4j. And what I am observing is that the relationship is created with a new blank node? Any Idea why it is happening?

I am trying to create a relationship between two nodes in neo4j. And what I am observing is that the relationship is created with a new blank node? Any Idea why it is happening?

  1. When I query for the nodes individually, it exists but the issue is when we create relationship between the two.

Hello @saurav7055 :slight_smile:

Can you show us your cypher request please? :slight_smile:

Regards,
Cobra

@Cobra The following is my cypher query:
match(cd: Description),(cv: Variety)
where cd.Id = cv.CV_Id_Ref
create (cv)-[r: hasCropDescription]->(cd)

Try :slight_smile:

MATCH (cd: Description), (cv: Variety)
WHERE cd.Id = cv.CV_Id_Ref
MERGE (cv)-[r: hasCropDescription]->(cd)

Regards,
Cobra

@Cobra
Not working with Merge.
Can you explain the scenarios where a blank node is created while creating a relationship between two existing nodes?

If a blank node is created, it means that one of the node is not created :slight_smile:

Can you show us the content of the nodes with a screenshot from Neo4j Desktop?