spring-data-r2dbc
spring-data-r2dbc copied to clipboard
Introduce replacement for ReactiveDataAccessStrategy
-
getAllColumnsandgetIdentifierColumns->RelationalPersistentEntity -
getOutboundRow->UpdateMapper -
getRowMapper-> direct usage viaEntityRowMapperandR2dbcConverter
I was able to use getAllColumns to create join assignments for a respective table alias:
inline fun <reified T : Any> ReactiveDataAccessStrategy.joinAssignments(tableAlias: String): String =
getAllColumns(T::class.java).joinToString(", ") { column ->
"$tableAlias.${column.reference.toLowerCase()} as ${tableAlias}_${column.reference.toLowerCase()}"
}
Maybe it is a good idea to have this functionality integrated along the respective alias mapping requested in https://github.com/spring-projects/spring-data-r2dbc/issues/448?