Package org.hibernate.annotations

Package containing all Hibernate's specific annotations.

Basic value mapping

Hibernate supports 2 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 2 approaches are not intended to be mixed. Specifying a custom-type takes precedence over the compositional approach. Though the compositional approach is recommended, both forms are fully supported. See the user-guide for a more in-depth discussion