diff --git a/jOOQ/src/main/java/org/jooq/Cursor.java b/jOOQ/src/main/java/org/jooq/Cursor.java index 712c130b92..2946a0febf 100644 --- a/jOOQ/src/main/java/org/jooq/Cursor.java +++ b/jOOQ/src/main/java/org/jooq/Cursor.java @@ -85,8 +85,19 @@ public interface Cursor extends Iterable , AutoCloseable { /** * Get a specific field from this Cursor. *

- * Usually, this will return the field itself. However, if this is a row - * from an aliased table, the field will be aliased accordingly. + * This will return: + *

+ * If several fields have the same name, the first one is returned and a + * warning is logged. * * @see Row#field(Field) */ diff --git a/jOOQ/src/main/java/org/jooq/Record.java b/jOOQ/src/main/java/org/jooq/Record.java index 70fef05bcd..a5684ea230 100644 --- a/jOOQ/src/main/java/org/jooq/Record.java +++ b/jOOQ/src/main/java/org/jooq/Record.java @@ -112,8 +112,19 @@ public interface Record extends Attachable, Comparable { /** * Get a specific field from this Record. *

- * Usually, this will return the field itself. However, if this is a row - * from an aliased table, the field will be aliased accordingly. + * This will return: + *

    + *
  • A field that is the same as the argument field (by identity + * comparison).
  • + *
  • A field that is equal to the argument field (exact matching fully + * qualified name).
  • + *
  • A field that is equal to the argument field (partially matching + * qualified name).
  • + *
  • A field whose name is equal to the name of the argument field.
  • + *
  • null otherwise. + *
+ * If several fields have the same name, the first one is returned and a + * warning is logged. * * @see Row#field(Field) */ diff --git a/jOOQ/src/main/java/org/jooq/RecordType.java b/jOOQ/src/main/java/org/jooq/RecordType.java index 2321567409..c3802ea10d 100644 --- a/jOOQ/src/main/java/org/jooq/RecordType.java +++ b/jOOQ/src/main/java/org/jooq/RecordType.java @@ -58,8 +58,19 @@ public interface RecordType { /** * Get a specific field from this record type. *

- * Usually, this will return the field itself. However, if this is a row - * type from an aliased table, the field will be aliased accordingly. + * This will return: + *

    + *
  • A field that is the same as the argument field (by identity + * comparison).
  • + *
  • A field that is equal to the argument field (exact matching fully + * qualified name).
  • + *
  • A field that is equal to the argument field (partially matching + * qualified name).
  • + *
  • A field whose name is equal to the name of the argument field.
  • + *
  • null otherwise. + *
+ * If several fields have the same name, the first one is returned and a + * warning is logged. * * @param The generic field type * @param field The field to fetch diff --git a/jOOQ/src/main/java/org/jooq/Result.java b/jOOQ/src/main/java/org/jooq/Result.java index d8e59f0128..62e5d7f3ce 100644 --- a/jOOQ/src/main/java/org/jooq/Result.java +++ b/jOOQ/src/main/java/org/jooq/Result.java @@ -79,8 +79,19 @@ public interface Result extends List, Attachable { /** * Get a specific field from this Result. *

- * Usually, this will return the field itself. However, if this is a row - * from an aliased table, the field will be aliased accordingly. + * This will return: + *

    + *
  • A field that is the same as the argument field (by identity + * comparison).
  • + *
  • A field that is equal to the argument field (exact matching fully + * qualified name).
  • + *
  • A field that is equal to the argument field (partially matching + * qualified name).
  • + *
  • A field whose name is equal to the name of the argument field.
  • + *
  • null otherwise. + *
+ * If several fields have the same name, the first one is returned and a + * warning is logged. * * @see Row#field(Field) */ diff --git a/jOOQ/src/main/java/org/jooq/Row.java b/jOOQ/src/main/java/org/jooq/Row.java index 3c60e12fac..f8b18ee3b9 100644 --- a/jOOQ/src/main/java/org/jooq/Row.java +++ b/jOOQ/src/main/java/org/jooq/Row.java @@ -62,8 +62,19 @@ public interface Row extends FieldOrRow { /** * Get a specific field from this row. *

- * Usually, this will return the field itself. However, if this is a row - * from an aliased table, the field will be aliased accordingly. + * This will return: + *

    + *
  • A field that is the same as the argument field (by identity + * comparison).
  • + *
  • A field that is equal to the argument field (exact matching fully + * qualified name).
  • + *
  • A field that is equal to the argument field (partially matching + * qualified name).
  • + *
  • A field whose name is equal to the name of the argument field.
  • + *
  • null otherwise. + *
+ * If several fields have the same name, the first one is returned and a + * warning is logged. * * @param The generic field type * @param field The field to fetch diff --git a/jOOQ/src/main/java/org/jooq/TableLike.java b/jOOQ/src/main/java/org/jooq/TableLike.java index fb398a6d18..c0f125026c 100644 --- a/jOOQ/src/main/java/org/jooq/TableLike.java +++ b/jOOQ/src/main/java/org/jooq/TableLike.java @@ -61,8 +61,19 @@ public interface TableLike extends QueryPart { /** * Get a specific field from this table. *

- * Usually, this will return the field itself. However, if this is a row - * from an aliased table, the field will be aliased accordingly. + * This will return: + *

    + *
  • A field that is the same as the argument field (by identity + * comparison).
  • + *
  • A field that is equal to the argument field (exact matching fully + * qualified name).
  • + *
  • A field that is equal to the argument field (partially matching + * qualified name).
  • + *
  • A field whose name is equal to the name of the argument field.
  • + *
  • null otherwise. + *
+ * If several fields have the same name, the first one is returned and a + * warning is logged. * * @see Row#field(Field) */ diff --git a/jOOQ/src/main/java/org/jooq/UDT.java b/jOOQ/src/main/java/org/jooq/UDT.java index 4e95e3e85f..e93aecde53 100644 --- a/jOOQ/src/main/java/org/jooq/UDT.java +++ b/jOOQ/src/main/java/org/jooq/UDT.java @@ -59,8 +59,19 @@ public interface UDT> extends QueryPart { /** * Get a specific field from this UDT. *

- * Usually, this will return the field itself. However, if this is a row - * from an aliased UDT, the field will be aliased accordingly. + * This will return: + *

    + *
  • A field that is the same as the argument field (by identity + * comparison).
  • + *
  • A field that is equal to the argument field (exact matching fully + * qualified name).
  • + *
  • A field that is equal to the argument field (partially matching + * qualified name).
  • + *
  • A field whose name is equal to the name of the argument field.
  • + *
  • null otherwise. + *
+ * If several fields have the same name, the first one is returned and a + * warning is logged. * * @see Row#field(Field) */