Hi Justin,

it's not an efficient query in general, but you can try with a NOT IN, eg.

SELECT FROM User where @rid NOT IN (
    TRAVERSE in('member_of') from (
         SELECT expand(in('permissions')) FROM Document where ...
    )
)



2015-10-13 16:05 GMT+02:00 Justin Swartsel <[email protected]>:

>
> I have a graph model that looks like this:
>
> User vertex ---------- member_of edge ----------> Group vertex
> Group vertex ---------- member_of edge ----------> Group vertex
> Group vertex ---------- permissions edge ----------> Document vertex
>
> So... Users and Groups can be members of Groups, and Groups can have
> permissions over documents. I'm trying to write a query that will tell me
> every User that does not have a path to a Document.
>
> Is there an efficient want to do queries like this in OSQL? Any tips on
> getting started writing this query?
>
> --
>
> ---
> 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.

Reply via email to