Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-19-2018 09:05 AM
Hello,
Can someone point the issue in below queries? the only change is the addition of named "n" node....
Regards,
Gabriel
Solved! Go to Solution.
12-19-2018 09:10 AM
Be aware that if you use a label you always have to prefix it with a :
.
In your 2nd query you're using ...(StyledElement)-[:StyledElement]-(StyledElement)...
. This does not refer to two nodes, each carrying StyledElement
label. Instead it's referring to a node given the alias StyledElement
- thus the start and end node needs to be the very same node. This is only true if your graph has self-relationships - I guess that's not the case.
Another tip: always use directions >
or <
when specifying relationships.
12-19-2018 09:10 AM
Be aware that if you use a label you always have to prefix it with a :
.
In your 2nd query you're using ...(StyledElement)-[:StyledElement]-(StyledElement)...
. This does not refer to two nodes, each carrying StyledElement
label. Instead it's referring to a node given the alias StyledElement
- thus the start and end node needs to be the very same node. This is only true if your graph has self-relationships - I guess that's not the case.
Another tip: always use directions >
or <
when specifying relationships.
12-19-2018 09:27 AM
You're totally right...thanks!
I just can't believe how rusty I've became after two months of not using Cypher...
12-19-2018 11:38 AM
That's why we have the community portal 😉
All the sessions of the conference are now available online