I can not use "or" since a user may be connected to more than 1 target.

So I need to ensure both ends of a chain user.@rid and target.@rid are very 
specific, yet the real result i am querying should be the "access" edge 
closest to the user.

I have a feeling I can not combine traversedEdge() with the where clauses 
pertaining to the target. 



On Monday, June 8, 2015 at 4:47:52 PM UTC-6, TheBeefiest wrote:
>
> Hello, I have a data structure such as:
> (vertex) [edge]
>
> (user) -> [access] -> (target)
> and
> (user) -> [access] -> (group) -> [access] -> (target)
>
> I want to retreive the [access].@rid closest to the user (farthest left in 
> the diagram) knowing the (user).@rid and (target).@rid
>
>
> I thought I could create this query by trial and error and looking at the 
> results, so I start with
> select from access where in = #13:8 and out = #12:17
> This finds the first case only
>
> So If i query
> select expand(in.out(access)) from access where out = #12:17
> I can see that the result is the (target) I am trying to link to at #13:8
>
> So my instinct is to try
> select from access where out = #12:17 and in.out(access).@rid = #13:8
>
>
> What is the fundamental thing I am misunderstanding? Can you not do in.out 
> in a where clause? I feel like the manual has not really taught me how to 
> write such a query with traverse or LET or otherwise.
>
> Is there any other resources which walks through creating complex queries?
>
> Thanks for your time.
>
>
>
>
>
>

-- 

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