Skip to content

[Question] 不同的顶点使用不同的边要怎么做 #2393

@liming1010

Description

@liming1010

Problem Type (问题类型)

configs (配置项 / 文档相关)

Before submit

  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

Environment (环境信息)

server: 1.0
jdk: 11

Your Question (问题描述)

不同的顶点使用相同的边,比如 用图表示多个家庭:每个家庭有自己的父亲和自己的仔仔,他们有相同的边就是: 父子。创建相同的边的时候就会提示:The edge label '父子' has existed

String edge = "父子";
        schema.edgeLabel(edge).sourceLabel("张三")
                .targetLabel("张小明")
                .properties(edge)
                .ifNotExist()
                .create();

        schema.edgeLabel(edge).sourceLabel("李四")
                .targetLabel("李二狗")
                .properties(edge)
                .ifNotExist()
                .create();

创建第二个的时候就会出错,不知道描述清楚没有

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions