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!

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

1 Like

Thanks so much! It is about my English..