Package org.hibernate.annotations
Annotation Interface JdbcTypeCode
@Target({METHOD,FIELD,ANNOTATION_TYPE})
@Inherited
@Retention(RUNTIME)
public @interface JdbcTypeCode
Specifies the JDBC type-code to use for the column mapping.
-
When applied to a Map-valued attribute, describes the Map value. Use
MapKeyJdbcTypeCodeto describe the key instead -
When applied to a List of array-valued attribute, describes the element. Use
ListIndexJdbcTypeCodeto describe the index instead -
When mapping an id-bag, describes the collection element. Use
CollectionIdJdbcTypeCodeto describe the collection-id - For other collection mappings, describes the elements
-
For discriminated association mappings (
@Anyand@ManyToAny), describes the discriminator value.
This code is generally as one of the values defined in Types, but are not
limited to these. The code is resolved against an internal registry of JdbcType
references. See the user guide for additional details.
See basic-value-mapping for high-level discussion of basic value mapping.
- Since:
- 6.0
- See Also:
-
Required Element Summary
Required Elements
-
Element Details
-
value
int valueThe standard JDBC Types code or a custom code. This ultimately decides whichJdbcTypeis used to "understand" the described SQL data type.
-