Following cypher does not work, Can anyone please throw some light? thanks.
this does not return anything, I am expecting it to return the user with id 111
following cypher works,
Why aren't u just querying like:
In any case, using ID is not suggested.
Your query is trying to find 2 different persons managed by
Thanks for the reply. My question was around `
This path traversal does not go back to origin. I assume this is intentional by neo4j devs and wanted to know rationals behind this.
you have one user and you want to find all the subordinates (actually only one level below) and from those subordinates the managers (which means there is more than one manager for some subordinates) and you want to insure the given user is in the list of the managers.
In cypher, you will query like this:
Pay attention that user, manager and subordinate are labels. has_manager is a relationship type. You read the whole according to the arrow direction. Therefore I change the relationship from "manager" to a verb to have it like a sentence:
are exactly the same.