Thanks for getting back to me with this. Apologies for my late response: 
for some reason I did not get any notifications for this post and hence the 
delay. I managed to solve my problem this using the query similar to:

select from (
    select expand(in('Owns')) from Car where model = <some_value>) where 
out('Lives') contains (zip=<some_other_value>)


I did however take a look at the Fetch plans as well and it does look like 
something that I would need to use for more complex queries as well. Thanks 
for getting back to me with this.


On Monday, March 17, 2014 1:48:05 PM UTC-4, Lvc@ wrote:
>
> 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] <javascript:>>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] <javascript:>.
>> 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