【问题标题】:Cannot insert data with key in Grakn无法在 Grakn 中插入带有键的数据
【发布时间】:2020-06-25 05:05:33
【问题描述】:

我正在将数据提取到 Grakn 并收到此错误

[person] 类型的事物不止一个拥有 [person-id] 类型的密钥 [949]。

这是我的查询:

insert $a isa customer, has customer-id "94929", has person-id "949";

这是我的架构:

person sub entity, 
key person-id;

customer sub person, 
key customer-id;

【问题讨论】:

    标签: vaticle-typedb vaticle-typeql


    【解决方案1】:

    这表明存在person 类型的实体或person 类型的子类型,在数据库中已经具有ID "949"。如果您运行以下查询,您应该会找到 1 个结果。

    match $x isa person, has person-id "949"; get;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-10-03
      • 1970-01-01
      • 2013-06-29
      • 1970-01-01
      • 2023-01-26
      • 1970-01-01
      • 1970-01-01
      • 2020-10-08
      相关资源
      最近更新 更多