Hi Julian,
I suppose the relationship is directed like this:
Class1 --Edge1-> Class2
The first one is very simple (if I got it right)
SELECT expand(in("Edge1").id) from Class2 where text='foo'
the second one could be something like
select expand(inV()) from (
select expand(outE("Edge1")) from Class1 where id = 1
) where preferred = true and text = 'foo'
Luigi
2015-02-07 20:19 GMT+01:00 Julian Klappenbach <[email protected]>:
>
> We have a graph with two classes:
>
> Class1 and Class2 with an edge Edge1.
>
> Class1 has the property "id", Class2 has a text property that is indexed.
> The Edge1 class has a boolean property "preferred" and integer "colorId".
>
> 1. We need a query that filters for elements of Class2 by the index on
> Class2, searching by a text string, and then finds edges off of that
> resulting set according to the class Edge1. The query should just return
> id from Class1.
>
> 2. We need a query that filters by "id" on Class1, then selects only
> edges of Edge1 from Class1 that are preferred and of the proper colorId.
> The result of the query should output the text of the Class2 node that
> matches this criteria.
>
> It's not clear how to do this with select, embedding queries, etc.
>
> --
>
> ---
> 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.