ufoss-org/kotysa

Error on update statement

Metis-Adrastea opened this issue · 2 comments

Exception in thread "DefaultDispatcher-worker-8" java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap')
	at org.ufoss.kotysa.r2dbc.SqlClientUpdateR2dbc$Return.execute$suspendImpl(SqlClientUpdateR2dbc.kt:87)
	at org.ufoss.kotysa.r2dbc.SqlClientUpdateR2dbc$Return$execute$1.invokeSuspend(SqlClientUpdateR2dbc.kt)

org.ufoss.kotysa.r2dbc.SqlClientUpdateR2dbc.Return#execute return Int, but last row in block result.rowsUpdated.awaitSingle() return Long
Publisher getRowsUpdated(); io.r2dbc.spi.Result

dependencies {
    implementation("org.ufoss.kotysa:kotysa-r2dbc-coroutines:2.3.1")
    implementation("io.r2dbc:r2dbc-pool:1.0.0.RELEASE")
    implementation("org.postgresql:r2dbc-postgresql:1.0.0.RELEASE")
}

Hello @Metis-Adrastea
This error is because you are using R2DBC 1.0.0.
For now Kotysa uses R2DBC 0.9.x, there are some breaking changes since.
Please wait for Kotysa 3.0.0 for R2DBC 1.0.x compatibility, see #113

Hi @Metis-Adrastea
Kotysa 3.0.0 is released, it is compatible with R2DBC 1.0.0 !