我正在使用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},
....
}
我不确定这意味着什么。
答案 0 :(得分:2)
这是问题所在。
relationship OneToMany {
Room to Pictures{RoomId},
....
}
将Pictures
更改为Picture
另外请关注以下关于此问题的github主题: