Skip to content
Advertisement

Tag: r2dbc

How to implement ManyToMany in r2dbc

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

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

Advertisement