raw*_*awi 5 grails grails-orm grails-3.0
我在旧的Config.groovy中:
grails.gorm.default.mapping = {
id generator = 'identity'
// send only the dirty fields to the database for updating
dynamicUpdate = true
dynamicInsert = true
}
Run Code Online (Sandbox Code Playgroud)
所以我把它放在另外的application.groovy中,但它不会再被尊重了.所有更新都已满,将所有字段发送到数据库,甚至是未更改的字段.
我试着在application.yml中翻译它:
grails:
gorm:
default:
mapping:
id generator: "identity"
dynamicUpdate: true
dynamicInsert: true
Run Code Online (Sandbox Code Playgroud)
......但仍然没有运气.
在 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
}
Run Code Online (Sandbox Code Playgroud)
但将其放入 application.yml 时也没有成功
| 归档时间: |
|
| 查看次数: |
1454 次 |
| 最近记录: |