我不知道如何建立实体间的关系,使它们相互依赖。jdl本身是否足以拥有下面这样的实体;
我试过这个
entity Region {
regionName String required
}
entity Country {
countryName String required
}
entity State {
stateName String required
}
entity City {
cityName String required
}
entity Address {
addressLine String required
}
relationship ManyToOne {
Country{region(regionName)} to Region,
State{country(countryName)} to Country,
City{state(stateName)} to State,
Address{city(cityName)} to City
}
paginate all with infinite-scroll
service all with serviceImpl这个jdl只显示它的父级。我想要创建一个新的地址实体与所有家长到地区。
如果我试图与所有的父母建立关系,所有的辍学都是个别的。你可以选择亚洲>美国>巴黎。
怎样才能正确地将地址与地区、国家、州、城市和正确的属地联系起来?
发布于 2018-11-14 22:50:04
JDL在我看来不错,只是JHipster不会生成带有传递关系的客户端视图。你得手动写。
在服务器端,可以使用DTO将所有数据合并到一个请求中。将dto * with mapstruct添加到JDL的底部,然后编辑生成的映射器。
https://stackoverflow.com/questions/53308386
复制相似问题