Grails 3.0.1 - how and where to configure grails.gorm.default.mapping

I had an old Config.groovy:

grails.gorm.default.mapping = { id generator = 'identity' // send only the dirty fields to the database for updating dynamicUpdate = true dynamicInsert = true } 

Therefore, I put this in the application.groovy application, but it will no longer be respected. All updates are complete, sending all fields to the database, not even changed.

I tried translating this into application.yml:

 grails: gorm: default: mapping: id generator: "identity" dynamicUpdate: true dynamicInsert: true 

... but still no luck.

+5
source share
1 answer

With Grails 3.1.10, it works in application.groovy:

 dataSource { //.... } grails.gorm.default.mapping = { uuid index:'idx_uuid', type: org.hibernate.type.UUIDCharType, length: 36, defaultValue: null batchSize 15000 } 

but it was not successful, even if it was placed in application.yml

+1
source

All Articles