I have a task to insert entity through r2dbc database client, and convert the result (map) into the entity. I want to do it this way:
databaseClient.insert().into(ApplicationData.class)
.using(applicationData)
.map(converter.populateIdIfNecessary(applicationData))
.first();
But the problem is converter entity MappingR2dbcConverter isn't created by spring. So, I decided to create it myself:
@Bean
public MappingR2dbcConverter converter(RelationalMappingContext mappingContext,
R2dbcCustomConversions r2dbcCustomConversions)....
My question, is it correct way to convert result map into entity?