我正在导入以下 jdl 以生成一个简单的 jhipster 整体。
我在启动后检查了 h2 db,它看起来很完美,但是当我尝试使用 ui 创建新的 InventryModel 或 Inventory 实体时,下拉菜单根本不起作用。
似乎当我添加 {required} (强制执行非 null fks)时,这就是它开始走下坡路的地方
config {
baseName hipcars
packageName com.hipcars
applicationType monolith
databaseType sql
devDatabaseType h2Disk
prodDatabaseType mysql
cacheProvider ehcache
enableHibernateCache true
authenticationType jwt
clientFramework angularX
useSass false
clientPackageManager npm
enableTranslation false
languages [ en, zh-cn, es ]
messageBroker kafka
searchEngine elasticsearch
serverPort 8080
websocket false
testFrameworks [protractor, cucumber, gatling]
buildTool gradle
}
entities *
}
entity Make {
name String required unique maxlength(20),
desc String
}
entity InventoryModel {
name String required unique maxlength(20),
vehicleType VehicleType
desc String
}
enum VehicleType {
SEDAN,
COUPE
}
entity Inventory {
vin String required unique maxlength(17),
comment String maxlength(128)
}
relationship ManyToOne {
InventoryModel{make(name) required} to Make,
Inventory{inventoryModel(name) required} to InventoryModel
}
dto * with mapstruct
paginate * with pagination
service * with serviceClass
search * with elasticsearch
filter *
但是,如果我这样做:
application {
config {
baseName hipcars
packageName com.hipcars
applicationType monolith
databaseType sql
devDatabaseType h2Disk
prodDatabaseType mysql
cacheProvider ehcache
enableHibernateCache true
authenticationType jwt
clientFramework angularX
useSass false
clientPackageManager npm
enableTranslation false
languages [ en, zh-cn, es ]
messageBroker kafka
searchEngine elasticsearch
serverPort 8080
websocket false
testFrameworks [protractor, cucumber, gatling]
buildTool gradle
}
entities *
}
entity Make {
name String required unique maxlength(20),
desc String
}
entity InventoryModel {
name String required unique maxlength(20),
vehicleType VehicleType
desc String
}
enum VehicleType {
SEDAN,
COUPE
}
entity Inventory {
vin String required unique maxlength(17),
comment String maxlength(128)
}
relationship ManyToOne {
InventoryModel{make(name)} to Make{required},
Inventory{inventoryModel(name)} to InventoryModel{required}
}
dto * with mapstruct
paginate * with pagination
service * with serviceClass
search * with elasticsearch
filter *
crud 屏幕工作正常,但 Inventory.inventoryModel 或 InventoryModel.make 没有“非空”约束,这是我真正需要的