#109 - Fix simple type conversion for projection queries.

We now correctly consider built-in converters for simple types that are read through DatabaseClient. Simple type projections typically select a single column and expect a result stream of simple values such as selecting a count and retrieving a Mono<Long>.
This commit is contained in:
Mark Paluch
2019-05-14 09:35:46 +02:00
parent 4a46692dfe
commit 430d984503
3 changed files with 146 additions and 2 deletions

View File

@@ -76,7 +76,8 @@ public class DefaultReactiveDataAccessStrategy implements ReactiveDataAccessStra
Assert.notNull(dialect, "Dialect must not be null");
R2dbcCustomConversions customConversions = new R2dbcCustomConversions(
StoreConversions.of(dialect.getSimpleTypeHolder()), Collections.emptyList());
StoreConversions.of(dialect.getSimpleTypeHolder(), R2dbcCustomConversions.STORE_CONVERTERS),
Collections.emptyList());
RelationalMappingContext context = new RelationalMappingContext();
context.setSimpleTypeHolder(customConversions.getSimpleTypeHolder());