简体   繁体   中英

Extract in, out in OrientDB query

I have a query in OrientDB as:

select in, out from E_Employe
  • "in" is the link to a vertex from class "User";
  • "out" is the link to a vertex from class "Company";
  • "E_Employee" is the edge between "User" and "Company".

I need to put instead of "in" some attributes from "User" (for example "username", "email"), and instead of "out", some attributes from "Company" (for example, "name", "address"), and I don't know how to do it.

You can just use dot notation:

 select 
    in.username as name, in.email as email, 
    out.name as companyName, out.address as companyAddress 
 from E_Employe

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM