Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[r2dbc] Support for one-to-one and one-to-many relationships #1834

Open
Topfgriff opened this issue Jul 12, 2024 · 8 comments
Open

[r2dbc] Support for one-to-one and one-to-many relationships #1834

Topfgriff opened this issue Jul 12, 2024 · 8 comments
Assignees
Labels
in: r2dbc Spring Data R2DBC status: pending-design-work Needs design work before any code can be developed status: waiting-for-triage An issue we've not yet triaged

Comments

@Topfgriff
Copy link

Topfgriff commented Jul 12, 2024

Since spring-data-r2dbc is now part of spring-data-relational, I wanted to reopen a much-discussed topic.

Quote from the original issue:

"Spring Data JDBC supports one-to-one and one-to-many (either as set, list or map) relationships:
https://docs.spring.io/spring-data/relational/reference/jdbc/mapping.html#jdbc.entity-persistence.types
It would be really useful to have this feature with R2DBC as well."

Being able to map "simple" relations would make working with r2dbc much easier. Many of our developers do not switch to Spring's reactive stack due to the lack of the ability to represent relations and prefer to stick with the MVC variant, where they can make use of JPA and Hibernate.

@infinite-dev22
Copy link

Any updates on this

@AbdelrahmanTarek97
Copy link

Any updates here guys?

@Exceptionflug
Copy link

Any updates here?

@ramarro123
Copy link

still no plan?

@thalesdev
Copy link

Guys any update?

@JeanPoffo
Copy link

Any update? Is a crucial feature

@schauder schauder added the in: r2dbc Spring Data R2DBC label Sep 25, 2024
@nekitbr
Copy link

nekitbr commented Oct 20, 2024

any updates on this?

@JoseLion
Copy link
Contributor

I'm reposting this comment here for everyone's visibility 🙂

I published spring-r2dbc-relationships library to help handle relationships in R2DBC. The solution is not ideal because it uses .collectList() to collect results and issue queries for each result, but that is what we'd have to do on user-land anyway. The library provides annotations for @OneToOne, @OneToMany, @ManyToOne, and @ManyToMany relationships, and it even handles Projections. Any feedback is welcome. I hope this can help people working with R2DBC while a proper solution is provided.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: r2dbc Spring Data R2DBC status: pending-design-work Needs design work before any code can be developed status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests