Provide better integration & docs (for manual joins) #439
Labels
status: waiting-for-feedback
We need additional information before we can continue
status: waiting-for-triage
An issue we've not yet triaged
I successfully integrated joins manually with data r2dbc while utilizing the r2dbc mapping and have a couple of issues I would like to discuss.
Please see the example project here
1. It should be documented that R2dbcConverter must be obtained through ReactiveDataAccessStrategy
The docs state that R2dbcConverter is recommended
to do most of the work
. R2dbcConverter however must be obtained via ReactiveDataAccessStrategy. This is fine, but should be documented, as I did expect R2dbcConverter to be readily available as a Bean when being so heavily advertised.2. R2dbcConverter should provide read functionality that accepts alias prefixes for columns
Please see this example.
I can easily map the root entity (tree) via
read(type, row, rowMetadata)
. Mapping the aliased joined entity (fruit) however seems only to be possible by hacking a customized read functionality, which would better be provided via R2dbcConverter. I have seen that prefixes are available internally but could not find a way to use them for my use case.3. Spring Data Repository Customization override priority is not working as documented
The docs state that
Custom implementations have a higher priority than the base implementation and repository aspects. This ordering lets you override base repository and aspect methods and resolves ambiguity if two fragments contribute the same method signature.
. This test shows, that overrides only occur when the parameter type of the override is made available to the custom implementation via generics. A matching signature without generics does not result in an override.4. Please find out whether a separate persistence constructor is really necessary when using transient fields (with default values) in Kotlin data classes
Here I made the joined Entity available as a transient field. The necessity to provide a separate persistence constructor seems odd to me, as I would think it should be possible to exclude a
@Transient
field during mapping for which default value is defined?The text was updated successfully, but these errors were encountered: