cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Limit the input into relationship property values to property values that the node already has

Hi,

I am new to Neo4j and Cypher. I am Using Neo4j Desktop On Windows and try to improve efficiency our internal operations.

Currently, I have two nodes and a relationship connecting them. One of the nodes and a relationship have common property. I want to limit the input into relationship property values to property values that the node already has. Are there any ways to solve this issue?

Thanks in advance.

1 ACCEPTED SOLUTION

Thank you @ameyasoft !
The issue that had plagued me for a long time is solved immediately by your advise!

View solution in original post

3 REPLIES 3

ameyasoft
Graph Maven
If I understand correctly, here is a solution:

match (a:Test1)
match (b:test2 {param: "new"})
with a, b
merge (a)-[:REL {param: b.param}]->(b)

Thank you @ameyasoft !
The issue that had plagued me for a long time is solved immediately by your advise!

Glad to help you. Thanks for your appreciation!!