首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Graql创建模式grakn.core.kb.concept.api.EntityType问题

Graql创建模式grakn.core.kb.concept.api.EntityType问题
EN

Stack Overflow用户
提问于 2019-11-30 00:46:13
回答 1查看 96关注 0票数 0

我是图形数据库的新手,我的grql代码中有一个错误,我不知道原因。

grql给出的错误是:

未知:概念[基本类型角色- Id -不是接口grakn.core.kb.concept.api.EntityType的类型

代码语言:javascript
复制
define

ruc sub attribute,
    datatype string;

about sub attribute,
    datatype string;

web-page sub attribute,
    datatype string;

location sub attribute,
    datatype string;

name sub attribute,
    datatype string;

creationDate sub attribute,
    datatype date;

dni sub attribute,
    datatype string;

championshipWon sub attribute,
    datatype long;

birdhdate sub attribute,
    datatype date;

yearsExperience sub attribute,
    datatype long;

duration sub attribute,
    datatype long;

sessionDate sub attribute,
    datatype date;

cost sub attribute,
    datatype long;

maxStudents sub attribute,
    datatype long;

minStudents sub attribute,
    datatype long;

maxTickets sub attribute,
    datatype long;

email sub attribute,
    datatype string;

password sub attribute,
    datatype string;

disciplines sub attribute,
    datatype string;

title sub attribute,
    datatype string;

schedule sub attribute,
    datatype string;

credentials sub entity,
    has email,
    has password;

school sub entity,
    relates students,
    relates trainers,
    relates credentials,
    plays creator,
    has ruc,
    has about,
    has location,
    has name,
    has creationDate,
    has disciplines;

trainers sub entity,
    relates students,
    plays creator,
    has dni,
    has championshipWon,
    has name,
    has birdhdate,
    has creationDate,
    has disciplines,
    has yearsExperience;


personalSession sub entity,
    relates students,
    relates trainers,
    plays creating,
    has sessionDate,
    has duration,
    has cost,
    has location,
    has disciplines;

schoolSession sub entity,
    relates school,
    relates trainers,
    relates students,
    plays creating,
    has cost,
    has duration,
    has schedule,
    has maxStudents,
    has minStudents,
    has location;

events sub entity,
    relates school,
    relates trainers,
    plays creating,
    has cost,
    has maxTickets,
    has title,
    has sessionDate,
    has location;

students sub entity,
    has dni,
    has name,
    has birdhdate,
    has creationDate,
    has disciplines;

create sub relation,
    relates creator,
    relates creating;

正如你所看到的,我认为所有的事情都是正确的,但是他们给了我错误,请帮帮我!

EN

回答 1

Stack Overflow用户

发布于 2019-11-30 02:50:16

relates本应在relation的定义中使用,但是您却在entity定义中使用它。您可以了解有关Schema Concepts in the Grakn Documentation构造的更多信息。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59108501

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档