我正在使用Jhipster 2.27.2
我创建了一个实体:collaborateur(nom,prenom)
我创建了一个实体:societeClient与collaborateur的关系:
与其他实体建立关系?你想加一个 与另一个实体的关系?是的
?另一个是什么名字 实体? collaborateur
?这段关系的名称是什么? collaborateur
?这种关系的类型是什么?一个一对多
?另一个实体中这种关系的名称是什么? societeClient
运行mvn时出现此错误:
引起:org.hibernate.AnnotationException:mappedBy引用一个 未知目标实体属性: com.techvalley.rhtechvalley.domain.Collaborateur.societeClient in com.techvalley.rhtechvalley.domain.SocieteClient.collaborateurs
Collaiberur类中不存在societeClient属性。 这是正常的吗?
答案 0 :(得分:2)
这是预期的行为:在创建其他实体之前,您没有在collaborateur中创建societeClient关系。
此处记录了这些内容:https://jhipster.github.io/managing-relationships/
要修复您的实体,您可以阅读'第二次生成实体' https://jhipster.github.io/creating-an-entity/