I found a solution and seems to be working. Could you please validate it? 
I'm afraid not to fool myself with the solution

select from (traverse * from #12:7 while (type= 'type of' or type is null))

The type is null clause is put because the vertices don't have the type 
property.

On Thursday, January 22, 2015 at 2:34:07 PM UTC+2, john davids wrote:
>
> Hello,
>
> I'm new to OrientDB. 
> I have a simple OrientDB database with Classes and one type of 
> relationship between them. 
> Even if is one type of Edge we decided to use a 'type' attribute for the 
> Edge that differentiates between them.
>
> Class0 --has a--> Class1
> Class1 --has a--> Class2
> Class1 --is a--> Class3
>
>
> I'm interested to start traversing the graph from Class0 vertex (with id 
> #12:7), but only following the relations that have the 'type' attribute 
> 'has a'.
> So the result should be Class0, Class1, Class2
>
> I'm not managing to find a correct 'while' clause...
>
> Something like this is obviously not ok
> traverse outE(), out() from #12:7 while (@class = 'Class' or (@class = 
> 'Relation' and outE().type = 'has a'))
>
> Any hints for me pls?
> Thank you!
>

-- 

--- 
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