Skip to content
Anjunar/ DOCS

API and limits

Look up the public API, supported mappings and rejected operations.

Modules

A public runtime API

hibernate-i18n-core supplies the annotations. hibernate-i18n contains the mapping bootstrap, locale-bound Sessions, typed editor and schema integration. There is one runtime artifact.

HibernateI18n.registryBuilder()
Creates a Hibernate registry builder with translation mapping contributors.
HibernateI18n.openSession(factory, locale[, tenantId])
Initializes annotated entities and opens a Session with fixed content locale and optional tenant.
HibernateI18n.translations(factory, entityClass)
Returns the annotation-derived editor handle for a mapped entity.
translations.fieldNames
Lists all translated property names from the entity mapping.
translations.get[V](session, entity, name, locale)
Returns Option of the exact locale value, with no fallback.
translations.set(session, entity, name, locale, value)
Writes an inactive locale override; null clears it.
translations.copyInactive(session, from, to)
Copies stored non-active locale rows and returns their count.
Scope

Know the supported contract

These constraints describe the Hibernate I18n 1.1.1 runtime contract.

Supported mapping shape
One UUID ID, String database values, and consistent field or JavaBean getter access.
Simple column identifiers; table names may also contain #.
String @TenantId for shared-table isolation.
Translated mapped-superclass members may feed one entity mapping per factory.
Rejected operations

Detached merge and replicate, mixed access and @Column on translated attributes are rejected. Query caching is rejected; second-level caching is disabled for localized entity hierarchies. Unrelated entities may still use their cache.

Managed edits

Load the entity in the target locale before editing its ordinary fields. New entities use persist. openSession discovers annotated entities automatically.