From 1e667fc2429fddf9c29e1bf556054121a2294e93 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 17 Feb 2020 13:01:43 +0100 Subject: [PATCH] #303 - Add note about boxed primitives when implementing custom converters. --- src/main/asciidoc/reference/mapping.adoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/asciidoc/reference/mapping.adoc b/src/main/asciidoc/reference/mapping.adoc index 8037969..255c6a8 100644 --- a/src/main/asciidoc/reference/mapping.adoc +++ b/src/main/asciidoc/reference/mapping.adoc @@ -52,14 +52,13 @@ public class MyAppConfig extends AbstractR2dbcConfiguration { // the following are optional - @Bean @Override - public R2dbcCustomConversions r2dbcCustomConversions() { + protected List getCustomConverters() { List> converterList = new ArrayList>(); converterList.add(new org.springframework.data.r2dbc.test.PersonReadConverter()); converterList.add(new org.springframework.data.r2dbc.test.PersonWriteConverter()); - return new R2dbcCustomConversions(getStoreConversions(), converterList); + return converterList; } } ---- @@ -225,6 +224,8 @@ The following example of a Spring Converter implementation converts from a `Row` ---- ==== +NOTE: R2DBC uses boxed primitives (`Integer.class` instead of `int.class`) to return primitive values. + The following example converts from a `Person` to a `OutboundRow`: ====