Ok, I think there is a problem in the first query. I guess in the inner
traverse, when you use the $current variable, you are referring to the
current record in parent select, right?
In this case you have to use $parent.$current

so the query should be

select $all, $current from TestV
let $all = (traverse out('TestE') from *$parent.*$current )

Let me know if it works for you


BTW, I also fixed the regression on 2.1 and pushed it in develop branch, so
it also works there.

Thanks

Luigi




2015-04-15 11:00 GMT+02:00 Luigi Dell'Aquila <[email protected]>:

> Hi Vitor,
>
> I'm looking at that (actually thanks to this I found a regression on
> 2.1-snapshot and I'm fixing it too).
> I'll give you a feedback ASAP
>
> Luigi
>
>
> 2015-04-14 21:08 GMT+02:00 Vitor Enes Duarte <[email protected]>:
>
>> Sorry to push this.
>> Is this an issue or am I missing something?
>>
>> quarta-feira, 8 de Abril de 2015 às 09:55:39 UTC+1, Vitor Enes Duarte
>> escreveu:
>>
>>> Hi,
>>>
>>> create class TestV extends V
>>> create class TestE extends E
>>>
>>>
>>> create vertex TestV set name = 'test1'
>>> create vertex TestV set name = 'test2'
>>> create vertex TestV set name = 'test3'
>>>
>>> create edge TestE from (select from TestV where name = 'test1') to (
>>> select from TestV where name = 'test2')
>>> create edge TestE from (select from TestV where name = 'test2') to (
>>> select from TestV where name = 'test3')
>>>
>>>
>>>
>>> select $all, $current from TestV
>>> let $all = (traverse out('TestE') from $current )
>>>
>>>
>>> select $all, $current from TestV
>>> let $all = (traverse out('TestE') from (select from TestV where name =
>>> 'test1') )
>>>
>>>
>>> The first query does not return the expected and the second query shows
>>> that the first should work.
>>> Is there a problem with *$current *here, or am I doing something wrong?
>>>
>>>  --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to