Package org.hibernate.annotations

Annotation Interface JdbcTypeCode


@Target({METHOD,FIELD,ANNOTATION_TYPE})@Inherited@Retention(RUNTIME)public @interfaceJdbcTypeCode
Specifies the JDBC type-code to use for the column mapping.
  • When applied to a Map-valued attribute, describes the Map value. UseMapKeyJdbcTypeCode to describe the key instead
  • When applied to a List of array-valued attribute, describes the element. UseListIndexJdbcTypeCode to describe the index instead
  • When mapping an id-bag, describes the collection element. UseCollectionIdJdbcTypeCode to describe the collection-id
  • For other collection mappings, describes the elements
  • For discriminated association mappings (@Any and@ManyToAny), describes the discriminator value.

This code is generally as one of the values defined inTypes, but are not limited to these. The code is resolved against an internal registry ofJdbcType references. See the user guide for additional details.

Seebasic-value-mapping for high-level discussion of basic value mapping.

Since:
6.0
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    The standardJDBC Types code or a custom code.
  • Element Details

    • value

      int value
      The standardJDBC Types code or a custom code. This ultimately decides whichJdbcType is used to "understand" the described SQL data type.