Skip to content

Getting ClassCast Exception with rowUpdated is Calls after Fetch #770

@vinodjavvadi

Description

@vinodjavvadi

I am trying to do an update and fetch the count of the update using the databaseClient and native query.

r2dbcEntityTemplate.getDatabaseClient().sql(UPDATE_AUTHOR)
.fetch().rowsUpdated();

Query String: UPDATE_AUTHOR = "UPDATE AUTHOR SET FIRSTNAME = 'TEST' WHERE AUTHORID = '23'";

I am using ORACLE R2DBC with io.r2dbc.spi version 1.0.0. I see the rowUpdated in 1.0.0 has been updated to return Long instead of Integer. But spring-data-r2dbc is still trying to return Integer and resulting in Class Cast Exception.

Can you please update this in new version of spinrg-data-r2dbc

Error:

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 java.base/java.util.stream.Collectors.lambda$summingInt$19(Collectors.java:681) ~[na:na]

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions