Bug passing $current in subquery

9 views
Skip to first unread message

Gianpaolo Altamura

unread,
Apr 24, 2014, 5:41:05 AM4/24/14
to orient-...@googlegroups.com
Hi,
i have this scenario:


Vertex A where class A have this property:

id, name, surname, date

Vertex B where class B have this property

id, custom_id, name

i have edges from A to n B vertices.

For instance:

A [1, Gianpaolo, Altamura, 01-01-1960]

B [1. 10. Paolo]
   [2, 10, Gianpaolo]

Two Edges connect A to two B vertices... and a.out_ return B vertices

i would like to execute this query: 

select name, out_.name , $b from A let $b=(select from out_ where name=$current.name)

and i don't have result for $b variable of this query but out_ return ['Paolo', 'Gianpaolo'] :

What's wrong? 


Thanks in advance,
Gianpaolo.



Gianpaolo Altamura

unread,
Apr 24, 2014, 6:16:26 AM4/24/14
to orient-...@googlegroups.com
Solved:

The correct query is

select name, out_.name , $b from A let $b=(select from out_ where name=$parent.$current.name)


It's only a context problem...
Reply all
Reply to author
Forward
0 new messages