I am using grails dbm plugin to insert records with in transaction so that I don't need to use 'flush:true'. But somehow it hangs & does not go forward. This used to work fine without withTransaction & with 'flush:true'.
Can you please let me know what is wrong with this code?
grailsChange {
change {
def list1 = [record1,record2]
list1.each {
DomainClass.withTransaction{
new DomainClass(it).save(failOnError: true)
}
}
}
}
console log says...
Starting dbm-update for database test @ jdbc:postgresql://localhost:5432/test
& does not go forward...& after long time I get this exception
iquibase.exception.LockException: Could not acquire change log lock. Currently locked by ... since ....