R2DBC does not support composite keys currently. I wonder how we may implement a many-to-many relationship for now? For example, given the two entities: and their schemas: I can create a table for the many-to-many mapping: But how should we define the mapping class ItemTag in kotlin/java? Or is it fine to omit the @Id? Then there cannot be any
Tag: r2dbc
ReaciveCrudRepository with Awaitility
writing tests and not sure how can one rewrite this code: to reactive one: Note: first findById() signature is: Optional findById(Long id) second findById() signature is: Mono findById(ID id) Answer It is possible to do something like this:
Obtaining a nested objects using Spring Data R2DBC
I’m new to Project Reactor and R2DBC. How to receive and merge Flux<Child> with Mono<Parent> properly using Spring Data R2DBC reactive repositories? Parent: ParentRepository: Child: ChildRepository: ParentPersistenceAdapter: My solution is: Answer Assuming the existence of a withChildren(Flux<Child> children) type method, you can just do: However, this is a bit odd – you wouldn’t usually have a Flux on a DAO