I tried using direct ID but not working also :  "select from (traverse in()
from #12:14)"

To be clear, i used the studio editor or console to test my query. The
result always return the vertex itself and additional column "IN HasDocument"
that is the edge i want to traverse back. Basically i can replace the
"in()" clause by anything, it always return the same result (ex : select
from (traverse dummy from #12:14)).

In general case, what is the query you can use the traverse in reverse way
? In my case, what is the query i can use to at least get all vertex
referencing my other vertex from any edge ? And from named edges ? I think
i missed  something in the syntax or i do not understand correctly for now.

2015-10-05 9:37 GMT+02:00 Luigi Dell'Aquila <[email protected]>:

> Hi Sebastien,
>
> it is very strange, your query is correct, so it's supposed to return the
> right results.
> Could you please check if the select subquery returns the right document?
>
> Thanks
>
> Luigi
>
>
> 2015-10-02 17:38 GMT+02:00 Sebastien Berthezene <[email protected]>:
>
>> Hi,
>>
>> I a new to OrientDB then not very comfortable with SQL for graph. How can
>> i get all ancestor from a vertex ? Considering following definitions :
>>
>> Class Vertex "Folder" extends V,ORestricted
>> Class Vertex "Document" extends V,ORestricted
>> Class Edge "HasFolder" extends E
>> Class E "HasDocument" extends E
>>
>> I have following graph :
>> Folder 01 --- [HasFolder]--> Folder 01.01 -- [HasDocument] --> My Doc 01
>> Folder 01 --- [HasFolder]--> Folder 01.02 -- [HasDocument] --> My Doc 02
>> Folder 01 --- [HasFolder]--> Folder 02.01 -- [HasDocument] --> My Doc 03
>> etc...
>> Starting from "My Doc 01", how can i get all ancestors (Folder 01.01,
>> Folder 01.02) using SQL "traverse" function ?
>>
>> SQL : "select from (traverse out() from #<ID Folder>) where
>> @class='Document'"
>> Works fine if i want to have all documents referenced into descending
>> tree but do not work if i use "in()" it do not work : "select from
>> (traverse in() from (select from Document where name='My Doc 01'))
>>
>> I tried with "V.out , E.in" and it do not work also. What is the correct
>> syntax ? I think i miss something :)
>>
>> --
>>
>> ---
>> 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 a topic in the
> Google Groups "OrientDB" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/orient-database/3WNJ22S04NY/unsubscribe.
> To unsubscribe from this group and all its topics, 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