Questions tagged [r2dbc]

R2DBC (Reactive Relational Database Connectivity) is an SPI which enables interacting with SQL database servers by executing SQL statements using a non-blocking reactive programming model with the Java programming language.

R2DBC is a Java-based, open source data access technology.

This technology is an SPI (Service Provider Interface) for the Java programming language that defines how a client may access a database using reactive programming. It specifies SPI methods for executing queries using a non-blocking driver. R2DBC is oriented towards relational databases.

Online resources

379 questions
3
votes
0 answers

Spring Data R2DBC Persist Nested Attributes

I've got a List (or Flux if I wanted) where each Order element has a List. I want to persist this object hierarchy into two tables of a relational database using spring-data-r2dbc (and therefore ReactiveCrudRepository) and…
Markus Ratzer
  • 1,292
  • 3
  • 19
  • 29
3
votes
0 answers

Spring data r2dbc mysql can not fetch the inserted id

I am trying to migrate my sample to the lates Spring Data R2dbc 1.0.0.RELEASE. org.springframework.boot.experimental spring-boot-starter-data-r2dbc
Hantsy
  • 8,006
  • 7
  • 64
  • 109
3
votes
1 answer

@enabler2dbcrepositories is unable to find my repository

I m migrating my database management from blocking to non-blocking(asynchronious) api spring data r2dbc.but there are some problems i need to fix? HERES WHAT I VE TRIED: 1.changing dependencies OF R2DBC AND other reactor stuffs. 2.changed springboot…
3
votes
1 answer

Pageable usage with Query Annotation

Can I use Pageable attribute in Spring Data R2dbc repositories with @Query annotation? For example; public interface PartyRepository extends ReactiveCrudRepository { @Query("select * from party order by id") Flux
gbalcisoy
  • 117
  • 3
  • 17
3
votes
1 answer

What is the motivation for using R2DBC?

I am very new to reactive spring stack and currently exploring R2DBC. Could you explain me what are the benefits of using R2dbcRepository over wrapping blocking JpaRepository into Mono/Flux? Let me bring some example of that: val producer:…
Oiew
  • 1,509
  • 1
  • 11
  • 14
3
votes
1 answer

Compatibility version spring cloud, r2dbc

I try to use spring with r2dbc here my build.gradle plugins { id 'org.springframework.boot' version '2.2.0.M4' id 'java' } apply plugin: 'io.spring.dependency-management' group = 'com.example' version = '0.0.1-SNAPSHOT' sourceCompatibility…
robert trudel
  • 5,283
  • 17
  • 72
  • 124
3
votes
2 answers

Overriding array(list) type conversions in Spring Data R2DBC

I'm using Postgres as my datasource and I've created a custom Spring converter for a property that holds a list of my custom objects: @Slf4j @WritingConverter @AllArgsConstructor public class CustomObjectListToStringConverter implements…
NikolaB
  • 4,706
  • 3
  • 30
  • 38
3
votes
0 answers

Is Spring Data R2DBC conflicts with Reactive Redis

I have a big problem, could you help me please I created Spring Boot (2.2) Webflux project with Spring Data R2DBC (Postgresql). Everything work fine, but when I add Reactive Redis dependency, start Jetty container, it throws Exception like…
Khai Ly
  • 135
  • 3
  • 7
3
votes
1 answer

Are there @MappedSuperclass in Spring Reactive Data (R2DBC)

I have a super Entity class like this: @Getter @Setter @NoArgsConstructor public class GenericEntity { @Id private Long id; @JsonIgnore @CreatedBy private Long createdBy; @JsonIgnore @CreatedDate private Long…
Khai Ly
  • 135
  • 3
  • 7
3
votes
1 answer

Mapping complex field of an object to a text field (serialized as JSON) before saving with reactive spring repository

I'm using Spring data r2dbc repositories to save pojo's to Postgres DB. I have a class with complex field definition: // Getters and setters omitted for brevity public class TestType { @Id private Long id; private TestDefinition…
NikolaB
  • 4,706
  • 3
  • 30
  • 38
2
votes
0 answers

Support for exception handling in R2dbcRepository, or how to decorate each method call in R2dbcRepository with my own error handler

Background: I have an application-wide universal exception handler to translate exceptions coming from R2dbcRepository, such as (an excerpt just to show the intended purpose): @Component public class ErrorHandler { public Throwable…
Honza Zidek
  • 9,204
  • 4
  • 72
  • 118
2
votes
2 answers

Jooq & R2DBC execute DDL

I have my tables schema generated from the database, I'm trying to execute the ddl to create the tables using an r2dbc connection to an h2 in memory, but I cannot figure out what should I do. The DSLContext.ddl method returns a Queries object that…
rascio
  • 8,968
  • 19
  • 68
  • 108
2
votes
1 answer

How to map left-joined tables to nested objects in JOOQ

I would like to left-join two tables and then map it into the following object where the metadata object should be null if no metadata was joined: data class ObjectDto( val objectId: String, val name: String, val metadata:…
m-kay
  • 260
  • 1
  • 11
2
votes
1 answer

R2DBC MSSQL r2dbc.mssql.client.ReactorNettyClient : Connection has been closed by peer

I have started to work on a Spring WebFlux and R2DBC project. Mainly, my code works fine. But after some elements I am receiving this warning r2dbc.mssql.client.ReactorNettyClient : Connection has been closed by peer after this warning I am…
2
votes
0 answers

How to gerenate custom id in spring data r2dbc?

When I have many entities and I want to use custom id generators (for example snowflake) with different sequences for each entity, should I write the corresponding generator in each entity or write all the id generators in one configuration class or…
周晨阳
  • 21
  • 1