here is the representation of my graph ( "()" for vertices, "--->" for edges):
(user1)--hasgroup->(friends)--hasuser->(user2)
i have rid of user1 and user 2. i wan't to retrieve properties of the group which has outE('hasuser') with user2
so i've tried:
for user1 @rid=#01:01
user2 @rid=#01:02
select out('hasgroup').name from #01:01 where out('hasuser') = #01:02
or like that:
select name from group where out('hasuser')=#01:02 and in('hasgroup') =#01:01
i've tried many others but these seems the more logical to me(but anyway, it doesn't work at all....)
edit:
while i get the group's rid with select shortestPath(#01:01, #01:02)[1]
,
i have nothing with select name from (SELECT shortestPath(#01:01, #01:02)[1])
i got it ! (partially...) with traverse:
select out.name, in from (traverse * from #01:01 while $depth <=3) where in=#01:02
but i'm not able to replace the '*' with something more precise... also i got it by testing many things and i don't really understand why #01:02 is an 'in' ?