hi
select from (traverse in('related_to') from (select from empl where
name='nagu')) where @class in ['project', 'client']
----+-----+-------+-------+-------------+--------------
# |@RID |@CLASS |name |in_related_to|out_related_to
----+-----+-------+-------+-------------+--------------
0 |#12:0|client |client1|[size=1] |[size=1]
1 |#11:0|project|p1 |null |[size=1]
----+-----+-------+-------+-------------+--------------
seems to do the job for me. or have i misunderstood?
~nagu.
On Tuesday, March 17, 2015 at 1:17:26 AM UTC+5:30, Patrick Hoeffel wrote:
>
> Hi, I need some help formulating a graph query in OrientDB Community
> 2.0.3. I'm verifying the syntax in SQL before I convert it to Java.
>
> My graph structure looks like this, "[name]" is a Vertex class and
> "(name)" is an Edge class and "->" represents the direction of the
> relationship. Every Vertex has a UUID as property "Id":
>
>
> `[Project]->(RELATED_TO)->[Client]->(RELATED_TO)->[Company]->(RELATED_TO)->[Employee]`
>
> What is the SQL that allows me to ask: "Given Employee with
> id='1234-1234-5678', show me all of the Projects (or Clients) connected to
> him." I've scoured all the documentation I can find, but I'm stumped.
>
> Thanks very much!
>
> Patrick
>
>
--
---
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.