Package org.hibernate.annotations
Annotation Interface TenantId
Identifies a field of an entity that holds a tenant id in discriminator-based multitenancy.
A field annotated @TenantId is automatically set to the
current tenant id
when the entity is first made persistent. The @TenantId field may not be directly
set by the application program.
If a @TenantId field is also annotated @Id, it forms
part of the composite primary key of the of an entity.
- Since:
- 6.0
- See Also: