diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultRecordMapper.java b/jOOQ/src/main/java/org/jooq/impl/DefaultRecordMapper.java index e84cca3dc9..7c71eb5ac1 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DefaultRecordMapper.java +++ b/jOOQ/src/main/java/org/jooq/impl/DefaultRecordMapper.java @@ -94,7 +94,11 @@ import jakarta.persistence.Column; import org.jooq.Attachable; import org.jooq.Configuration; +import org.jooq.Converter; +import org.jooq.ConverterProvider; import org.jooq.Field; +import org.jooq.JSON; +import org.jooq.JSONB; import org.jooq.Record; import org.jooq.Record1; import org.jooq.RecordMapper; @@ -104,6 +108,7 @@ import org.jooq.Result; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableRecord; +import org.jooq.XML; import org.jooq.conf.Settings; import org.jooq.exception.MappingException; import org.jooq.tools.StringUtils; @@ -125,26 +130,13 @@ import org.jooq.tools.reflect.ReflectException; * specific arrays fails, a {@link MappingException} is thrown, wrapping * conversion exceptions. *

- *

If <E> is a field "value type" and - * <R extends Record1<?>>, i.e. it has exactly one - * column:
+ *
If the supplied type is an interface or an abstract class
*

- * Any Java type available from {@link SQLDataType} qualifies as a well-known - * "value type" that can be converted from a single-field {@link Record1}. The - * following rules apply: - *

- *

+ * Abstract types are instantiated using Java reflection {@link Proxy} + * mechanisms. The returned proxy will wrap a {@link HashMap} containing + * properties mapped by getters and setters of the supplied type. Methods (even + * JPA-annotated ones) other than standard POJO getters and setters are not + * supported. Details can be seen in {@link Reflect#as(Class)}. *

*

If <E> is a {@link TableRecord} type (e.g. from a * generated record), then its meta data are used:
@@ -155,6 +147,25 @@ import org.jooq.tools.reflect.ReflectException; * the source table via {@link Table#indexOf(Field)} and their values are * mapped. Excess source values and missing target values are ignored. *

+ *

If <E> is a field "value type" and + * <R extends Record1<T1>>, i.e. it has exactly one + * column:
+ *

+ * The configured {@link ConverterProvider} is used to look up a + * {@link Converter} between T1 and E. By default, the + * {@link DefaultConverterProvider} is used, which can (among other things): + *

+ * If such a {@link Converter} is found, that one is used to map to + * E. + *

*

If a default constructor is available and any JPA {@link Column} * annotations are found on the provided <E>, only those are * used:
@@ -271,14 +282,6 @@ import org.jooq.tools.reflect.ReflectException; * argument types * *

- *

If the supplied type is an interface or an abstract class
- *

- * Abstract types are instantiated using Java reflection {@link Proxy} - * mechanisms. The returned proxy will wrap a {@link HashMap} containing - * properties mapped by getters and setters of the supplied type. Methods (even - * JPA-annotated ones) other than standard POJO getters and setters are not - * supported. Details can be seen in {@link Reflect#as(Class)}. - *

*

Other restrictions
*

*