Skip to content

ReactiveCrudRepository function returning Tuple #323

Open
@hfhbd

Description

@hfhbd

Hey,

having an entity class and an entity interface extending ReactiveCrudRepository, please add the possibility to return a tuple from a query instead the entity.

@Table
data class Entity(@Id val id: Int? = null, val cell: String)

interface EntityRepo: ReactiveCrudRepository<Entity, Int> {

    @Query("Select 1, 2")
    fun failing(): Mono<Tuple2<Int, Int>>
}

Currently, the SimpleR2dbcRepository tries to return an Entity instead a Tuple2, which results in failure, because the values does not match the Entity constructor.

Maybe adding the Tuple classes as a codec could be enough.

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