[英]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.