For some reason when calling a field with text typ...
# exposed
w
For some reason when calling a field with text type in H2,
org.h2.jdbc.JdbcSQLException: The object is already closed
is thrown. At:
Copy code
val map = transaction { loggedRequest.parameters } // throws exception
Copy code
val map = transaction { loggedRequest.method } // doesn't throw exception
For:
Copy code
object ApiLogs : IntIdTable() {
    ...
    val parameters = text("parameters")
    val method = varchar("method", 191)
    ...
}

class ApiLog(id: EntityID<Int>) : IntEntity(id) {
    companion object : IntEntityClass<ApiLog>(ApiLogs)

    ...
    var parameters by ApiLogs.parameters
    var method by ApiLogs.method
    ...
}
t
Which version do you use? Do you load loggedRequest in another transaction?
w
Version 0.9.1 and the loggedRequest is loaded in a transaction.
t
Could you show your jdbc url ?