I'm new to the reactive programming paradigm, specifically Project Reactor within Spring.
Back in the days when Hibernate was the most used ORM tool, we could use it to automatically create the relationships, such as one-to-many, many-to-many etc. Hibernate would then also create the mediate tables automatically.
From the few I could find on the internet about this subject, I figured a couple things and would like someone to elaborate on them, they are:
- Automatic relationships aren't supported under the reactive programming paradigm.
- Automatic related tables (x-to-many) creation aren't supported either.
So, if I have a microservice application using Spring WebFlux, Spring Data R2DBC and Postgres, do the relationship tables have to be created manually, as we're out of @OneToMany, @ManyToMany, @JoinColumn, @JoinTable support?
Eg.:
@Data // Lombok
public class Scope {
@Id
private long id;
private String name;
}
@Data // Lombok
public class Role {
@Id
private long id;
private String name;
private Set<Scope> scopes; // <-- here
}
Snippets are very welcome.