0

我正在尝试在 JDL 中创建具有多图像的作业表

我习惯了一对多的关系,但 jhipster 警告:

WARNING! otherEntityRelationshipName is missing in .jhipster/Attachment.json for relationship {
    "relationshipName": "job",
    "otherEntityName": "job",
    "relationshipType": "many-to-one",
    "otherEntityField": "id",
    "otherEntityRelationshipName": "attachment"
}, using attachment as fallback

我的工作 JDL 是这样的:

microservice * with job

entity Job{
    name String required
    description String
}

entity Attachment{
    name String
    image ImageBlob
}

relationship OneToMany{
     Job{image} to Attachment
}
service * with serviceClass
paginate * with pagination


我该如何解决。请帮忙!

4

1 回答 1

0

JHipster 目前默认不提供单向一对多关系。
它应该是这样的:

relationship OneToMany{
    Job{image} to Attachment{job}
}
于 2020-07-28T05:37:29.410 回答