I tried a bit further with another strategy, not including the user result
just yet:
select name, out(IS_USED_IN).include('@rid') as project from
( select expand( in(LOCATED_IN).in(LOCATED_IN).in(LOCATED_IN) ) from
( select from #13:0 ) )
now I get a strange result. I expect 2 dc results and one project object
per dc. However, for project result I get RID's for; the connected Project
(expected) and a city (not expected).
I guess I'm not there yet?! What is exactly happening here..
On Wednesday, 26 August 2015 16:20:59 UTC+7, Rolf Streefkerk wrote:
>
> I have the following relationships (where the keywords in CAPS are edges,
> lowercase keywords are vertices). The dc vertex is the main Object in my
> model:
>
> dc -- LOCATED_IN --> city -- LOCATED_IN --> country -- LOCATED_IN -->
> continent
>
> dc -- IS_USED_IN --> project -- IS_OWNED_BY --> user
>
>
> What I need is for a specific Continent selection (#13:0) all DC's and
> their Projects owned by User 'X'
>
> So far I tried using LET keyword to unionall queries and expand the
> result, but I'm not getting the results I want.
>
> I want to have something like this (non working example):
>
> SELECT *, out('IS_USED_IN').include('name') as project FROM dc
> WHERE
> ( out(IS_LOCATED_IN).out(IS_LOCATED_IN).out(IS_LOCATED_IN).@rid = #13:0 )
> AND
> ( .out(IS_USED_IN).out(IS_OWNED_BY).name = 'X' )
>
> How can I chain these relationships and query on a specific field? (@rid,
> name and so on)
>
--
---
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.