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
25
votes
5 answers

Log values of query parameters in Spring Data R2DBC?

In Spring Data R2DBC I can log SQL queries by using logging.level.org.springframework.data.r2dbc=DEBUG in the application.properties. However, this doesn't log the actual values that are bound as query parameters. How can I log the actual values…
Harold L. Brown
  • 8,423
  • 11
  • 57
  • 109
20
votes
2 answers

How to implement OneToMany, ManyToOne and ManyToMany with R2DBC in a project which previously used JPA?

I have to re-implement a few back-end services and one of the main requirement is to make the whole flow reactive. Previously the services used hibernate with PostgreSQL so the mentioned connections were provided by the framework. Since I have to…
19
votes
4 answers

R2DBC - Oracle Database Support

I found R2DBC when I was searching reactive relational database drivers, but I couldn't see any driver for Oracle DB. Does anyone have any information on whether to provide support?
Can
  • 191
  • 1
  • 4
18
votes
1 answer

How to join tables in r2dbc?

In java reactor, r2dbc. I have two tables A, B. I also have repositories for them defined. How can i get data made up of A join B? I only come up with the following approach: call databaseClient.select from A and consequently in a loop call select…
voipp
  • 1,243
  • 3
  • 18
  • 31
17
votes
1 answer

Spring R2DBC DatabaseClient.as(…)

In my spring-boot 2.3 application, I have a simple data method using DatabaseClient: fun getCurrentTime(): Mono = databaseClient .execute("SELECT NOW()") .asType() .fetch() …
Rüdiger Schulz
  • 2,588
  • 3
  • 27
  • 43
17
votes
3 answers

Is it possible to use both Spring Data R2DBC and Spring Data JPA in a single Spring boot application?

I have an application which is using Spring data JPA and hibernate envers for db auditing. Since R2DBC doesn't support auditing yet, is it possible to use combination of both in a single application? If yes, Plan is to use Spring Data JPA for…
Purushotham
  • 205
  • 3
  • 10
16
votes
5 answers

Setup h2 in spring boot application with r2dbc and flyway

I'm playing around with Spring Boot and the reactive jdbc driver called r2dbc. In my main application I'm using Postgres as a database and now I want to the use h2 for the tests. And the Flyway migration is working with the setup but when the Spring…
imalik8088
  • 1,501
  • 5
  • 21
  • 39
15
votes
1 answer

Spring data r2dbc - Composite Primary key

Looks like Spring Data r2dbc does not support composite primary key. Is that a known issue? I dont see support for @Embedded.
user1578872
  • 7,808
  • 29
  • 108
  • 206
11
votes
4 answers

Spring data r2dbc and pagination

I'm using the new spring data r2dbc module and i'm able to extract the data using a ReactiveCrudRepository. Now i need to introduce pagination but i cannot manage to do it. I tried with this public interface TestRepository extends…
Luca
  • 321
  • 1
  • 3
  • 16
9
votes
2 answers

R2DBC unable to create connection with h2 protocol

I'm trying to leverage H2 for testing and have the following configuration in src/test/resources/application.yaml: spring: r2dbc: url: r2dbc:h2:file://testdb I have an empty test annotated with @SpringBootTest but when I run it I get the…
Jit B
  • 1,206
  • 14
  • 26
9
votes
3 answers

Spring boot data r2dbc auto create tables

I have a simple question, is it possible to auto-generate tables using spring boot data r2dbc for MySQL or other databases? in JPA I added spring.jpa.hibernate.ddl-auto=update and created tables This is my pom:
Mateusz Sobczak
  • 1,551
  • 8
  • 33
  • 67
9
votes
2 answers

Reactor : How to convert a Flux of entities into a Flux of DTO objects

I have a User entity and a Role entity. The fields are not important other than the fact that the User entity has a role_id field that corresponds to the id of its respective role. Since Spring Data R2DBC doesn't do any form of relations between…
Martin
  • 1,977
  • 5
  • 30
  • 67
9
votes
4 answers

Can spring data r2dbc generate a schema?

I am creating a quick project using R2DBC and H2 to familiarize myself with this new reactive stuff. Made a repository that extends ReactiveCrudRepository and all is well with the world, as long as i use the DatabaseClient to issue a CREATE TABLE…
Martin
  • 1,977
  • 5
  • 30
  • 67
8
votes
2 answers

R2dbc custom converter

How can I add my custom converter to mu spring boot application? My entity field @CreatedDate @Column(value = "create_time") private Instant createTime; My converters are @Bean public Converter
Vurtatoo
  • 346
  • 3
  • 8
8
votes
4 answers

How to substitute @Sql in tests with Spring data r2dbc?

In Spring data JPA there is an @Sql annotation which is very handy for setting up integration tests for persistence layer. It can roll out test data before each test and perform a clean up after it. However, I could not find it in spring-data-r2dbc…
fyrkov
  • 2,245
  • 16
  • 41
1
2 3
27 28