kyleg
12/20/2019, 2:52 AMreturn keepAndRestoreTransactionRefAfterRun(db) {
run()
}
Somehow this function (the line run()
calls
internal inline fun TransactionInterface.closeLoggingException(log: (Exception) -> Unit){
try {
close()
} catch (e: Exception){
log(e)
}
}
based on the stack with the connection close having a breakpoint. Not sure how that happens, but I’m assuming when you create the connection, there should be some keepalive flag that tells the transaction not to auto-close the connection. Because the default behavior of in-memory H2 DBs (which are also supported by Exposed) also have as their default behavior to destroy all data when the connection is closed.
Although with H2 you can override this by passing some flag.