[英]Grails 3.0.1 - how to configure grails.gorm.default.constraints in application.yml
[英]Grails 3.0.1 - how and where to configure grails.gorm.default.mapping
我在舊的Config.groovy中:
grails.gorm.default.mapping = {
id generator = 'identity'
// send only the dirty fields to the database for updating
dynamicUpdate = true
dynamicInsert = true
}
所以我把它放在另外的application.groovy中,但它不會再被尊重了。 所有更新都已滿,將所有字段發送到數據庫,甚至是未更改的字段。
我試着在application.yml中翻譯它:
grails:
gorm:
default:
mapping:
id generator: "identity"
dynamicUpdate: true
dynamicInsert: true
......但仍然沒有運氣。
使用Grails 3.1.10,它適用於application.groovy:
dataSource {
//....
}
grails.gorm.default.mapping = {
uuid index:'idx_uuid', type: org.hibernate.type.UUIDCharType, length: 36, defaultValue: null
batchSize 15000
}
但是在將它放入application.yml時沒有成功
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.