我在旧的 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
...但仍然没有运气。