database - Graql 创建模式 grakn.core.kb.concept.api.EntityType 问题
问题描述
我是图形数据库的新手,我的 grql 代码有错误,我不知道原因。
grql 给出的错误是:
未知:概念 [Base Type [Role] - Id - 不是类型 [interface grakn.core.kb.concept.api.EntityType]
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;
正如你所看到的,我认为所有的事情都是正确的,但是他们给出了那个错误,请帮忙!
解决方案
relates
旨在在 a 的定义中使用relation
,但是,您在entity
定义中使用它。您可以在 Grakn 文档中了解有关架构概念的更多信息。
推荐阅读
- rust - 如何处理生锈借用检查器
- spring - Spring WebClient 正在检索错误的 Content-Type
- visual-studio-code - 如何像记事本++那样在VS代码中编辑二进制文件?
- javascript - javascript中的Python字典
- python - 如果 open() 在 python 中创建一个流对象,为什么它被称为函数而不是类
- c++ - While循环创建无限循环
- r - 图表上的亮点和标记
- matlab - 部分旋转matlab代码的高斯消除
- python - Python将列表附加到数据框列
- amazon-web-services - 在 s3 存储桶目录上调用 listobjects 操作时拒绝 Boto3 访问