Package org.hibernate.annotations

A set of mapping annotations which extend the O/R mapping annotations defined by JPA.

Basic value mapping

Hibernate supports two approaches to defining a mapping strategy for basic values:
  • A "compositional" approach using a combination of the following influencers for various parts of mapping Note that JavaType, JdbcType, JdbcTypeCode and Mutability all have specialized forms for the various model parts such as map-key, list-index, (id-bag) collection-id, etc.
  • Contracted via the UserType interface and specified using Type. As with the compositional approach, there are model-part specific annotations for specifying custom-types as well.
These two approaches are not intended to be mixed. Specifying a custom-type takes precedence over the compositional approach. Although the compositional approach is recommended, both forms are fully supported.

Please see the user guide for a more in-depth discussion.