我在旧的 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 时也没有成功
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)