Hi Rohit, This is something you can do with Fetch Plan (look for Fetching Strategies in documentation).
Lvc@ On 17 March 2014 15:23, Rohit Raman <[email protected]> wrote: > Hi, > > I am new to OrientDb and have been trying to get a feel for it. I am > wondering is there is way to get a subgraph with dependencies as part of > one query. > For example: > > Assuming there is a set of dependencies like: > 1.Person1 ----- friend of--- > Person 2 ----- friend of--- > Person 3 > 2. Person1 ---- lives in ----> City 1 > 3. Person2 ---- lives in ----> City 1 > 4. Person3 ---- lives in ----> City 1 > > I am aware that there is a way to find all the persons living in City 1 by > doing a query similar to: > > select expand( in('lives in')) from City. > > However this query returns me individual vertices of each Person (Person1, > Person2 and Person3) and some additional information about it. > Is is however to possible to get back the entire subgraph of dependencies > as mentioned in line 1 (Person1 ----- friend of--- > Person 2 ----- friend > of--- > Person 3) by doing just one query? > > Any help is greatly appreciated. > > Thanks, > Rohit > > > -- > > --- > 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.
