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.

Warning about path with multiple relationships

Hi,

I need to find paths between two nodes:

MATCH  p=(ms:Org { id: 1 })-[:WORK_REL|:INVEST_IN|:GRADUATE_FROM*5]-(cs:Person { name: 'Martin' })
RETURN p limit 5

I got a warning:

What is the correct way to get certain relationships between two nodes without a warning?
My cypher version is 3.5.2
Thanks!

1 ACCEPTED SOLUTION

Hi!

You'll be delighted to know it's an easy fix, you don't need to repeat the colon, e.g.
MATCH p=(ms:Org { id: 1 })-[:WORK_REL|INVEST_IN|GRADUATE_FROM*5]-(cs:Person { name: 'Martin' })

Hope that helps

View solution in original post

2 REPLIES 2

Hi!

You'll be delighted to know it's an easy fix, you don't need to repeat the colon, e.g.
MATCH p=(ms:Org { id: 1 })-[:WORK_REL|INVEST_IN|GRADUATE_FROM*5]-(cs:Person { name: 'Martin' })

Hope that helps

Thanks so much! It is about my English..