diff --git a/jOOQ/src/main/java/org/jooq/Fields.java b/jOOQ/src/main/java/org/jooq/Fields.java index f42d3cce0a..1c85fdd0cc 100644 --- a/jOOQ/src/main/java/org/jooq/Fields.java +++ b/jOOQ/src/main/java/org/jooq/Fields.java @@ -40,6 +40,7 @@ package org.jooq; import java.util.stream.Stream; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -156,11 +157,18 @@ public interface Fields { /** * Get a field known to this type by unqualified name coerced to - * type, or null if no field is known to this type - * by this name. + * type using {@link Field#coerce(Class)}, or null + * if no field is known to this type by this name. *

* If several fields have the same ambiguous name, the first one is returned * and a warning is logged. + *

+ * NOTE [#15286]: It is strongly recommended to pass only + * {@link Class} references of types supported by jOOQ internally, i.e. + * types from {@link SQLDataType}. If you're using any custom data types by + * means of a {@link Converter} or {@link Binding}, it's better to pass that + * converted {@link DataType} reference explicitly to + * {@link #cast(DataType)}. * * @param name The unqualified name of the field * @param type The type to coerce the resulting field to @@ -170,8 +178,8 @@ public interface Fields { /** * Get a field known to this type by unqualified name coerced to - * dataType, or null if no field is known to this - * type by this name. + * dataType using {@link Field#coerce(DataType)}, or + * null if no field is known to this type by this name. *

* If several fields have the same ambiguous name, the first one is returned * and a warning is logged. @@ -207,8 +215,8 @@ public interface Fields { /** * Get a field known to this type by qualified name coerced to - * type, or null if no field is known to this type - * by this name. + * type using {@link Field#coerce(Class)}, or null + * if no field is known to this type by this name. *

* This will return: *