Jhipster-JDL studio-与用户的关系

问题描述 投票:0回答:1

我想创建一个与User实体(生成了我的jhipster)具有一对一关系的实体(称为StudentInfo)。如何使用JDL-studio做到这一点?我是否像这样声明与用户的关系:

relationship OneToOne {
    StudentInfo{user} to User
}

jhipster会将我的jdl模式中的“用户”识别为用于身份验证的用户,还是会发生冲突?

spring entity relationship jhipster jdl
1个回答
0
投票

这是我在其中一个blog app的JDL中完成的步骤。

relationship ManyToOne {
  Blog{user(login)} to User
  Post{blog(name)} to Blog
}

relationship ManyToMany {
  Post{tag(name)} to Tag{entry}
}

就您而言,我认为您需要这样做:

relationship OneToOne {
    StudentInfo{user(login)} to User
}

login是将显示在下拉列表中的字段。是的,它将识别您的JDL模式中的“用户”。请注意,这仅适用于具有OAuth的整体式和微服务。如果将微服务与JWT或UAA一起使用,则不支持。

© www.soinside.com 2019 - 2024. All rights reserved.