JDL:UndeclaredEntityException

时间:2018-06-12 12:53:02

标签: jhipster

我正在使用jdl对我的数据库进行原型设计,我很喜欢它的简单性。问题是文档有点轻,我收到这个错误: UndeclaredEntityException: In the relationship between Room and Pictures, Pictures is not declared.

以下是代码:

...

entity Room {
    RoomId Integer required,
    RoomName String,
    SquareFootage Integer,
    HasRefrigirator Boolean,
    PrivateBathroom Boolean
}

entity Picture {
    Picture Integer required,
    Url String
}
...

relationship OneToMany {
    Room to Pictures{RoomId},
    ....
}

我不确定这意味着什么。

1 个答案:

答案 0 :(得分:2)

这是问题所在。

relationship OneToMany {
    Room to Pictures{RoomId},
    ....
}

Pictures更改为Picture

另外请关注以下关于此问题的github主题:

https://github.com/jhipster/jhipster-uml/issues/172