hi Suraj,

The TRAVERSE statement automatically skips already traversed nodes, this is
why you don't see all the parents

You can use a MATCH with "while" condition instead:

MATCH
  {class:nodesLeaf, as:a} <-contains- {as:b, while:(true), pathAlias:b_path}
RETURN b_path || b as thePath

I hope it helps

Thanks

Luigi

Il giorno mar 28 ago 2018 alle ore 09:52 Suraj Shankar <
surajhebbarshanka...@gmail.com> ha scritto:

>
> My query is
> traverse in(“contains”) from (select from nodesLeaf) strategy depth_first
>
> On Tue, Aug 28, 2018 at 12:37 AM, Suraj Shankar <
> surajhebbarshanka...@gmail.com> wrote:
>
>> Yes I am using the traverse command in sql
>>
>> On Tue, Aug 28, 2018 at 12:37 AM, Luigi Dell'Aquila <
>> luigi.dellaqu...@gmail.com> wrote:
>>
>>> Hi Suraj,
>>>
>>> how do you do the traversal? in SQL?
>>>
>>> Thanks
>>>
>>> Luigi
>>>
>>>
>>> Il giorno mar 28 ago 2018 alle ore 09:31 Suraj Shankar <
>>> surajhebbarshanka...@gmail.com> ha scritto:
>>>
>>>> HI All,
>>>>  I have a graph as following :
>>>> 1->1.1
>>>> 1->1.2
>>>> 2->2.1
>>>> 2->2.2
>>>> 2->2.3
>>>>
>>>> Now when i start at any of the leaf nodes and traverse using in nodes,
>>>> i get
>>>> 1.1,1
>>>> 1.2
>>>> 2.1,2
>>>> 2.2
>>>> 2.3
>>>> However i want the parent node as well in all the paths. How can i
>>>> perform this?
>>>>
>>>> --
>>>>
>>>> ---
>>>> 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 orient-database+unsubscr...@googlegroups.com.
>>>> 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 orient-database+unsubscr...@googlegroups.com.
>>> 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 orient-database+unsubscr...@googlegroups.com.
> 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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to