Skip to content

Class cast exception when deleting row from h2 database #807

Closed
@aswarcewicz

Description

@aswarcewicz

spring-r2dbc:5.3.24

When using H2 together with spring-data-r2dbc (1.5.6) there is a class cast error when deleting row from database.
This code fragment:

private static Mono<Integer> sumRowsUpdated(
			Function<Connection, Flux<Result>> resultFunction, Connection it) {
		return resultFunction.apply(it)
				.flatMap(Result::getRowsUpdated)
				.collect(Collectors.summingInt(Integer::intValue));
	}

Is using integers but getRowsUpdated contains Long value

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions