-
Notifications
You must be signed in to change notification settings - Fork 132
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 ORM Relationships Support #99
Comments
There is no relationship support so far. We might want to consider a certain degree of relationships (e.g. aggregate-scoped relations that are fetchable with a single query). |
thanks |
Hi, Can I ask for an update on this please? Thanks! |
Hello, I completely know all the R2DBC suite libraries requires a lot of new functionality, but IMHO, this issue is the only one left for many projects in order to be production-ready with an stable full reactive flow. Has this development been considered? Thanks a lot. |
Likely the definition of being production-ready varies. Right now we're blocked by relation fetching. When constructing an entity using its constructor, we require the reference to be materialized beforehand. Since constructing entities and reading those is an imperative bit, we cannot reach out to the database otherwise we would introduce blocking behavior. Another aspect is that while consuming the result stream of data, we cannot issue queries until the entire result is fully consumed, otherwise we would wait for queries that never complete. To fix the issue, we need to collect all entities into a Until we (or someone else) can solve both issues, we cannot provide read-relation mapping. |
I have encountered the same problem when I was using Spring Data R2dbc, I hope to provide a solution like what is done in Spring Data Jdbc, https://spring.io/blog/2018/09/24/spring-data-jdbc-references-and-aggregates. This issue should not be closed when it is not resolved. |
Up! For people who are here for a workaround: DZone has a tutorial on mapping using a functional interface |
Not sure why this task is closed. dJani97, thanks but the provided workaround only works in a X-ToOne relation. I miss a way to manage X-ToMany ones. With Jdbc you can use ResultSetExtractor to deal with all information returned by the query, is there a way to do the same with R2dbc? As far as I know, Mappers or Converters can only be used to work with one row every time. |
more informaton in #356 |
hi
there any support for orm relationships in r2dbc ??
The text was updated successfully, but these errors were encountered: