Hi Eric,

With plain SELECT:

SELECT inV().vertexProp1, inV().vertexProp2, edgeProp1, edgeProp2 from (
    select expand(outE("TheEdgeClass")) FROM V WHERE foo = ?
)

With MATCH:

MATCH
   {class:V, as: theRootNode, where:(foo = ?)}
.outE("TheEdgeClass"){as:theEdge} .inV() {as:firstLevel}
RETURN theEdge.prop1 as p1, theEdge.prop2 as p2, firstLevel.prop1, as p3,
firstLevel.prop2 as p4

Thanks

Luigi


2017-10-29 18:01 GMT+01:00 Eric24 <[email protected]>:

> I'm looking for a suggestion on how to construct a SELECT statement that
> returns specific properties from linked classes.
>
> I have a V class that can have one or more identical V classes linked via
> standard E edges. What I'm trying to do is select the "root" V class and
> have the query return properties from the first level of linked V classes.
> Selecting the "root" V class is simple, and that query does include the
> "out_" object that contains the RIDs for the linked V classes, but I can't
> figure out how to actually get data from the linked V classes (without
> doing a second query, which I what I'm trying to avoid). I feel like this
> is dirt-simple, but I'm missing some detail.
>
> As a "bonus", it would go nice to optionally include specific properties
> from the link E edges, too.
>
> --
>
> ---
> 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