简体   繁体   English

如何从orientDB的同一张表中检索两个不同边的数据?

[英]How to retrieve data two different edge from the same table in orientDB?

i have an user table with user list and an event able with user event stored 我有一个带有用户列表的用户表和一个能够存储用户事件的事件

Two table schema Schema 1: User Table name address 两表架构架构1:用户表名称地址

Schema 2: Event Table 模式2:事件表

event_name event_date event_name event_date

Create in edge E with user Table

create edge E  #12:41 to #17:3 ->This edge represent the owner of the event.

then create a new edge with the user table to store the attendee 然后使用用户表创建一个新边来存储与会者

create edge EAttendees #12:39 to #17:3

Here i need to get the attendee of the particular event 在这里,我需要让特定事件的参与者参加

The following query returns both the edges in E and EAttendees i need only the EAttendees list ie #12.39. 以下查询返回E和EAttendees中的两条边,我只需要EAttendees列表,即#12.39。 How can i accomplish this 我怎样才能做到这一点

select in(EAttendees) from con_user_event where @rid = #17:3

    #12:41
    #12:39


    select in() from con_user_event where @rid = #17:3
    #12:41
    #12:39

The id #12:39 is the attendee id and #12:41 is the owner id ID#12:39是与会者ID,#12:41是所有者ID

How can we get the edge attach to EAttendees only not the whole E 我们如何才能使边缘不仅仅附着在E参加者身上

How to get only the values in EAttendees? 如何仅获取EAttendees中的值?

问题是您没有引用边缘类的名称,并且由于OrientDB解析器中的一个怪癖,它会假设您只是指所有边缘,因此应该对其进行修复。

select in("EAttendees") from con_user_event where @rid = #17:3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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