首页 > 解决方案 > 为什么我的 jdl 文件生成的域有代码错误?

问题描述

嗨,我正在使用 JHipster 并在 jdl 中进行一些培训,

所以当我从我的 jdl 生成实体模型时,我遇到了一些代码脚手架错误,这是由于我的 JDL 中的错误还是 JHipster 生成器中的问题

entity Club{
    federation String,
    nomClub String,
    dateFondation LocalDate
}

entity Boxeur {
    nom String,
    prenom String,
    dateNaissance LocalDate,
    lieuNaissance String,
    dateInscription LocalDate
}

entity Entraineur{
    nom String,
    prenom String,
    dateNaissance LocalDate,
    lieuNaissance String,
    president Boolean
}
enum LieuSeance {
    SALLE,
    STADE,
    MONTAGNE,
    AUTRE
}

entity TypeSeance{
    typeSeance TypeSeance0
}
enum TypeSeance0 {
    COMPETITION,
    SPARRING,
    ENDURANCE,
    STREATCHING,
    TECHNIQUE,
    PHYSIQUE,
    ENTRETIEN,
    AUTRE
}

entity Seance{
    titre String,
    detail String,
    dateSeance LocalDate,
    lieu LieuSeance
}

entity Payement{
    montant Long,
    datePayement LocalDate
}

relationship OneToMany{
    Entraineur{seances(titre)} to Seance{entreneur(nom)},
    Boxeur{versement} to Payement,
    TypeSeance to Seance
}
relationship OneToOne{
   Club{president(nom)} to Entraineur
}
relationship ManyToMany{
    Seance{participants(nom)} to Boxeur{assistes(titre)}
}
paginate all with pagination

dto * with mapstruct

service all with serviceImpl 

错误出现在 Seance.Java 中,添加和删除参与者在脚手架中出现错误,如下图所示

滴度和 S() 是脚手架错误

我在我的 JDL 文件中犯了一个错误,所以我得到了这个脚手架错误谢谢你

我在JHipster中创建了一个问题

标签: jhipsterjdl

解决方案


问题在新版本中更正以获取更多信息,请访问 github 问题跟踪器


推荐阅读