oriendDB如何访问关联数据

oriendDB how to access linked data

我有一个 class projects extend V a class clients extend V 和 edge hasInvites extend E.

项目有属性名称等

clients,具有 clientName 等属性

hasInvites 具有属性 dueDate。

hasInvites edge in 和 out 有指向项目和客户的链接 classes。

我可以像这样查询 hasInvites

select * from hasInvites

给我正确的数据

out: (the project that's linked #35:34 and the client that's linked #36:11)
dueDate:  2017-01-01

如何访问项目和客户的链接数据?

我试过 expand() 函数,但它不起作用。即:

select *, expand(in(projects)) from hasInvites

我想得到的是这样的数据:

dueDate: 2017-01-01
projectName: Project A (taken from the projects class)
clientName:  client A (taken from the clients class)

在 MySQL 中,我会创建一个带有连接的视图并访问 projectName 和 clientName。

我如何访问 orientDB 中的那些?

在这个例子中:

  • 'in' 是具有参数 'projectName'
  • 的顶点 'project'
  • 'out' 是具有参数 'clientName'
  • 的顶点 'client'
  • 'link' 是带参数 'dueDate'
  • 的边 'hasInvites'

你可以这样做:

SELECT dueDate, in.projectName, out.clientName From hasInvites

希望对您有所帮助。