0
使用Grails 2.3.9我試圖在數據庫遷移變更集中實現groovy變更。它使用Grails服務來生成UUID。從常規數據庫遷移調用Grails服務
執行dbm-update失敗,並顯示「連接代理在事務完成後不可用」錯誤。
的變更:
changeSet(author:"sola", id: "gefc.currency.defaultGlobalBaseCurrency.v49") {
grailsChange {
change {
def igs = ctx.getBean("idGeneratorService")
sql.withBatch(20,
"INSERT INTO core_setting_value " +
" (id, version, module, scope, code, " +
" string_value, boolean_value, long_value) " +
"VALUES " +
"(?, 0, 'gefc.currency', 'global', ?, ?, ?, ?)"
) { ps ->
ps.addBatch(igs.uuid(), "baseCurrency", \
"HUF", null, null)
}
confirm 'Base currency configuration (global setting)'
}
}
}