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
8
votes
4 answers

Multi-tenant schema-based application with r2dbc

I'm working on a multi-tenant reactive application using Spring-Webflux + Spring-data-r2dbc with the r2dbc driver to connect to a Postgresql database. The multi-tenant part is schema-based: one schema per tenant. So depending of the context (the…
Arnaud42
  • 101
  • 1
  • 4
7
votes
2 answers

Why some abstract class has spring @Configuration annotation?

This is an example for the question. (spring-data-r2dbc) package org.springframework.data.r2dbc.config; @Configuration(proxyBeanMethods = false) public abstract class AbstractR2dbcConfiguration implements ApplicationContextAware { ... } According…
blue-hope
  • 2,735
  • 1
  • 9
  • 14
7
votes
1 answer

Spring boot r2dbc transactional: which method to annotate

I am using spring-boot 2.4.2 with webflux to connect to a postgres database. I observed a behavior while using @Transactional that I don't understand. To showcase the behavior, I created an example application that attempts to add rows to two…
alampada
  • 2,329
  • 1
  • 23
  • 18
7
votes
1 answer

Best practice of handling relations between tables in Spring Data R2dbc

I tried to create a user/roles relation in RDBMS and want to use R2dbc(Spring Data R2dbc) to shake hands with the backend database. Assume there are three tables, users, roles, and user_roles. @Table("users") class User { @Id private String…
Hantsy
  • 8,006
  • 7
  • 64
  • 109
7
votes
5 answers

QueryDSL annotation processor and gradle plugin

Cannot understand how to configure build.gradle for using querydsl annotation processor without any jpa/jdo/mongo. I want to use @QueryEntity annotation to generate Q classes so then I will be able to compose dynamic SQL queries using DSL support…
Viktor M.
  • 4,393
  • 9
  • 40
  • 71
7
votes
2 answers

How to map a 1:1 relationship with Spring Data R2DBC?

I have these simplified tables CREATE TABLE address( id VARCHAR(36) NOT NULL PRIMARY KEY, zip VARCHAR(5) NOT NULL, city VARCHAR(32) NOT NULL ) CREATE TABLE customer( id VARCHAR(36) NOT NULL PRIMARY KEY, name VARCHAR(32) NOT…
Juergen Zimmermann
  • 2,084
  • 7
  • 29
  • 43
6
votes
6 answers

Spring Data R2DBC PostgreSQL not saving new record with UUID @Id

I have a simple entity, consisting of two UUIDs: @Table("library") public class LibraryDao { @Id private UUID id; @NonNull private UUID ownerId; } I have a corresponding table in PostgreSQL: CREATE TABLE IF NOT EXISTS library (id…
Rick
  • 397
  • 3
  • 16
6
votes
2 answers

Why there are multiple calls to DB

I am playing with R2DBC using Postgre SQL. The usecase i am trying is to get the Film by ID along with Language, Actors and Category. Below is the schema this is the corresponding piece of code in ServiceImpl @Override public Mono
6
votes
1 answer

How do I map a class using spring data and r2dbc in kotlin

The org.springframework.r2dbc DatabaseClient class has moved to import org.springframework.r2dbc.core.DatabaseClient; from import org.springframework.data.r2dbc.core.DatabaseClient; The Spring data documentation…
Interlated
  • 5,108
  • 6
  • 48
  • 79
6
votes
2 answers

How to map One to Many / One to One to a POJO in Spring Data R2DBC

I am trying to replicate some functionality that I was using in Spring Data JPA in the new reactive Data r2dbc. I am aware that r2dbc is not a full-fledged ORM but wanted to understand as what could be the best way to replicate the below scenario in…
abstractKarshit
  • 1,355
  • 2
  • 16
  • 34
6
votes
0 answers

Using a Persistent Quartz Scheduler while also using R2DBC in Spring Boot

I have been trying to get Quartz to work while using R2DBC in spring boot. So far, I have not figured out how to do this. This is because when a JDBC DataSource is created, it tries to initialize my R2DBC repositories which it cannot do because…
6
votes
2 answers

Ignore field for update in spring-r2dbc

I am using spring r2dbc and ReactiveCrudRepository, I have a field which I need to ignore for when update query is generated @Data @Table(PRODUCT_TABLE) public class ProductEntity { @Id @GeneratedValue(strategy = GenerationType.AUTO) // Id…
6
votes
3 answers

Spring data R2DBC: org.springframework.data.mapping.PropertyReferenceException: No property findAll found for type

I am trying to use ReactiveQuerydslPredicateExecutor along with R2dbcRepository for my spring-data-r2dbc application with r2dbc-mssql client version 0.8.1.RELEASE I upgraded the spring-boot version from 2.2.7.RELEASE to 2.3.0.RELEASE and…
6
votes
3 answers

R2DBC and enum (PostgreSQL)

Update 15/08/2020: Looks like Enum support was added on Jun 16. R2DBC commit. Does H2DBC support PostgreSQL enums? I checked they git page but it doesn't mention anything about it. If it does, how enums could be used (INSERT, SELECT)? Lets say…
my-
  • 604
  • 9
  • 17
6
votes
2 answers

R2dbc H2 issues when using inMemory database

I was trying to taste R2dbc and using Embedded H2 like: public ConnectionFactory connectionFactory() { //ConnectionFactory factory = ConnectionFactories.get("r2dbc:h2:mem:///test?options=DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE"); …
Hantsy
  • 8,006
  • 7
  • 64
  • 109
1
2
3
27 28