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
1
vote
1 answer

MultiDb Configuration with Spring r2dbc always uses only one Database

I have a simple Multi Database setup to try out Multi Database configuration with r2dbc. However, it is not working as expected, it always uses the first Database. @Configuration @EnableR2dbcRepositories(databaseClientRef="postgreDbClient".…
Andrews
  • 895
  • 3
  • 15
  • 30
1
vote
2 answers

Transactions, Spring Boot Starter JDBC & R2DBC

I am trying to migrate a Spring Boot project, version 2.3.0.M3, that have used JDBC template to R2DBC. The project also uses Liquibase so I cannot get rid of JDBC altogether. I have both the spring-boot-starter-data-r2dbc and the…
user11868214
1
vote
1 answer

Spring R2DBC + SQL Server: procedures query

I am required to execute a stored procedure in a SQL server to fetch some data, and since I will later save the data into a Mongo and this one is with ReactiveMongoTemplate and so on, I introduced Spring R2DBC. …
WesternGun
  • 11,303
  • 6
  • 88
  • 157
1
vote
1 answer

Error getting H2 with r2dbc running in Spring boot

for days now I've been trying to get a simple H2 / R2dbc database running in Spring boot with WebFlux. The app starts up just fine but when I call the /todos endpoint to get all the objects in the database I get the following…
David V
  • 161
  • 3
  • 13
1
vote
0 answers

Spring Data R2DBC. Entity creation

Silly question - how do you create entities in Spring Data R2DBC? All examples I struck on create those manually, which is a bit... "not springy". Am I missing some part of the documentation, or should R2DBC dependency should spring-data-jpa should…
Draaksward
  • 759
  • 7
  • 32
1
vote
1 answer

Equivalent to DataJpaTest for Spring Data's ReactiveCrudRepository and R2DBC

For JpaRepository there is @DataJpaTest. @DataJpaTest allows for simple and isolated testing of JPA repositories in Spring. We are using spring-data-r2dbc. Is there an equivalent of @DataJpaTest for ReactiveCrudRepository to test it in isolation?
Harold L. Brown
  • 8,423
  • 11
  • 57
  • 109
1
vote
2 answers

Spring Autowire cannot find implementation for R2DBC Repository in Generic Class

@Service public abstract class BaseService, E, D> { @Autowired protected R repository; public abstract D convertToDTO(E entity); public abstract E convertToEntity(D DTO); public…
1
vote
2 answers

Extend reactive crud repository

Try to extend spring boot ReactiveCrudRepository interface to have separate methods for entity insertion and updating. Right now save() method differentiate insertion from updating checking ID is provided or not. The idea why I need extend it in…
Viktor M.
  • 4,393
  • 9
  • 40
  • 71
1
vote
1 answer

Spring Data R2DBC - Building custom postgresql query in reactive repository

I have a table that contains entities with a String id, String jobId, and String status. Given a jobId and a List of ids, I would like to query that table and return a Flux of ids that are not present in the database. I can do this successfully if…
Bal
  • 2,027
  • 4
  • 25
  • 51
1
vote
2 answers

Create Table in spring r2dbc

I have a spring r2dbc connection for a postgresql database and would like to Create a Table, effectively the equivalent of SQL CREATE TABLE IF NOT EXISTS name (id, bigint); how can I do it as DatabaseClient seems to only support select/insert?
mangusbrother
  • 3,988
  • 11
  • 51
  • 103
1
vote
2 answers

You have defined query method in the repository but you don't have any query lookup strategy defined. spring

Have an issue starting up a postgresql r2dbs spring boot application. I am getting the below error for this configuration.: Inside main module: org.springframework.boot
mangusbrother
  • 3,988
  • 11
  • 51
  • 103
1
vote
2 answers

Is it possible to use hibernate envers @Audited with r2dbc?

I hope to achieve auditing of my tables using @Audited annotation of the Hibernate Envers project while I'm using Spring Data R2DBC or plain R2DBC to insert data into my tables. Is this even feasible. I am not able to tell if Spring Data R2DBC uses…
Sylvester
  • 421
  • 3
  • 6
1
vote
1 answer

Transactions with ReactiveCrudRepository with spring-data-r2dbc

I'm trying to implement transactions with spring-data-r2dbc repositories in combination with the TransactionalDatabaseClient as such: class SongService( private val songRepo: SongRepo, private val databaseClient: DatabaseClient ){ …
Seanvd
  • 186
  • 1
  • 9
0
votes
0 answers

Spring reactive db (r2dbc) insert data multithread issue

I'm trying to insert data in parallel ,using spring r2dbc, to psql table No matter how I run ,either in different connections or using the same connection and running in parallel batches/statements it always revert to a single thread…
shachar
  • 523
  • 4
  • 13
0
votes
0 answers

Correct way of catching R2dbcRepository exeptions and throwing another

I'm using R2dbcRepository for interacting with database: @Repository public interface OfficeRepository extends R2dbcRepository { } and what i want to do is: Fetch office by FindById method and if no record exists with this Id,…
hamed
  • 114
  • 2
  • 2
  • 9