Hi,

in the pattern matching employed by cypher nodes already bound to an identifier 
won't be bound to another identifier. 

That is the reason why all nodes that already belong to principals don't appear 
in n.

In your case it might be easiest to just "return n,principals"

Cheers

Michael

Am 02.11.2011 um 10:56 schrieb D. Frej:

> Hi,
> 
> I have a very simply graph:
> 
> UserGroup 2 <-[:IS_MEMBER_OF]- UserGroup 1, User 3
> UserGroup 1 <-[:IS_MEMBER_OF]- User 1, User 2
> 
> I use the following cypher to find all nodes that are below UserGroup 2 
> (I start at node User 3 and go one level up in the tree which equals 
> UserGroup 2):
> 
> START principals=node:nodes(NAME='User 3')
> MATCH (principals)-[:IS_MEMBER_OF]->()<-[:IS_MEMBER_OF*0..]-(n)"
> RETURN n
> 
> The result does not contain User 3 even though it is a child of 
> UserGroup2 and connected to it via IS_MEMBER_OF relationship. Is there 
> any way to also include it in the result?
> 
> Thanks,
> 
> - Didi
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user

_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to