Questions tagged [spring-data-r2dbc]

Spring Data R2DBC is a module of Spring Data based on R2DBC R2DBC stands for Reactive Relational Database Connectivity.

See https://spring.io/projects/spring-data-r2dbc for more information.

412 questions
6
votes
0 answers

Should I use Flow as a return type in controller-based Spring Webflux service

I am trying to make use of Kotlin coroutines along with spring-data-r2dbc(databaseClient) in our next Spring Boot service. I'm already familiar with both concepts but as we dug deeper into the details of implementation I started to ask myself this…
6
votes
3 answers

Missing DatabaseClient in Postgres spring boot R2dbc application

I have the following error coming up: Exception: Error creating bean with name 'inventoryService' defined in URL [jar:file:/app.jar!/BOOT-INF/classes!/com/epi/services/inventory/items/InventoryService.class]: Unsatisfied dependency expressed through…
mangusbrother
  • 3,988
  • 11
  • 51
  • 103
6
votes
2 answers

How do I handle nullable fields using either the Mono or the DatabaseClient provided by R2dbc in Spring?

I am at a loss for how to contruct an efficient query in R2dbc (java) using spring-webflux (reactive). Using the DatabaseClient object provided by R2dbc (or alternatively, a Connection object), it seems that I am only able to call different…
6
votes
1 answer

r2dbc feasibility for production applications and future roadmap

I've been closely following r2dbc updates by pivotal and I wish to build my application using this approach. I have tried few small applications with r2dbc postgres driver as below :
Crickcoder
  • 2,135
  • 4
  • 22
  • 36
5
votes
1 answer

Designing one-to-one and one-to-many relationships in Spring Data R2DBC

I am exploring possible ideas when it comes to designing the one-to-one and one-to-many relationships while using Spring Data R2DBC. As Spring Data R2DBC still do not support relationships natively there is still a need to handle those on our own…
Lisek
  • 753
  • 2
  • 11
  • 31
5
votes
2 answers

R2dbc Repositories always null with Mockito

I am trying to test a service, but the Repository is always null. When using a JPA repository, I never had this issue. I am not sure if it has something to do with ReactiveCrudRepository. Has anyone encountered this issue? …
Mike3355
  • 11,305
  • 24
  • 96
  • 184
5
votes
1 answer

Spring data r2dbc for many to many mapping

I am using Spring data r2dbc and it doesn't support many to many mapping. Tables :- user user_role user_role_mapping As usual, one user can have multiple mapping. Sql query, select * from user u, user_role_mapping urm, user_role ur where u.user_id…
user1578872
  • 7,808
  • 29
  • 108
  • 206
5
votes
1 answer

Get fail constraint name from DataIntegrityViolationException with spring-data-r2dbc and postgresql

I have some constraints in a postgresql database (unique, foreign key...). I use spring data r2dbc repository : ReactiveCrudRepository I would like to transform the DataIntegrityViolationException throw by the repository to some custom exception…
fpa
  • 51
  • 3
5
votes
0 answers

Spring Data R2dbc Auditing does not work as expected

My sample codes are based on Spring Boot 2.4.0-M2(spring-data-r2dbc 1.2.0-M2), Java 11, Postgres. In the spring blog and change log, it delcares Spring Data R2dbc got audting support. I Enabled auditing like…
Hantsy
  • 8,006
  • 7
  • 64
  • 109
5
votes
2 answers

how to use EnumCodec in r2dbc-postgresql

I am trying to use EnumCodec from the latest version of r2dbc-postgresql (0.8.4) unsuccessfully, and I wondered if you could help me. I use also spring-data-r2dbc version 1.1.1. I took the exact example from the GitHub and created an enum type…
eladya
  • 83
  • 1
  • 5
5
votes
1 answer

Spring Data R2DBC how to query hierarchical data

I am new to Reactive programming. I have to develop a simple spring boot application to return a json response which contains the company details with all its sub companies and employees Created a spring boot application (Spring Webflux + Spring…
5
votes
1 answer

How to fix the conflict when implement two id interfaces?

One interface is 'org.springframework.data.domain.Persistable', it's a java interface with a method ID getId() in 3rd-party lib. Another interface is a Kotlin interface interface IdEntry { val id: String}. Now my business entry needs to implement…
RJ.Hwang
  • 1,683
  • 14
  • 24
5
votes
0 answers

Spring Data R2DBC - Backpressure not taken into account?

This thread is a continuation of the Github issue at: https://github.com/spring-projects/spring-data-r2dbc/issues/194 Context: Hi, I just tried a very simple Exemple, based on two reactive repositories: Given br, a r2dbc crud repo, and cr, another…
cambierr
  • 391
  • 4
  • 14
5
votes
1 answer

Is it possible to implement a POJO in Spring Boot that has a field representing a composite primary key while not utilizing JPA or nested classes?

I am currently trying to implement R2DBC within Spring Boot for an application that is already far into development - meaning, unfortunately, our DDL is not flexible, since other microservices depend on this it and vice versa. One significant…
4
votes
1 answer

Spring R2DBC doesn't support multiple host/failover

I'm using spring r2dbc in my project and trying to make it work with multiple host/failover postgres topology; in other words, where the db url is like this: r2dbc:postgresql:failover://host1,host2,host3:port/ I'm using 2.7.5 version of spring boot,…
mr.nothing
  • 5,141
  • 10
  • 53
  • 77
1 2
3
27 28