Secara default, manajer transaksi untuk hibernasi dan MySQL tidak mengaktifkan titik penyimpanan.
Di BootStrap.groovy tambahkan berikut ini:
transactionManager.setNestedTransactionAllowed(true)
Kemudian dalam bertransaksi Anda dapat melakukan hal berikut:
Thing.withTransaction { status ->
//Do some work and a save
def savePoint = status.createSavepoint()
//do other work
if(checkOk)
{
//Everything worked so don't need the save point anymore
status.releaseSavepoint(savePoint)
}
else
{
//The other work did not work so rollback from it.
status.rollbackToSavepoint(savePoint)
}
}