Multitenancy

Use the Multitenancy area in the JPA Details view to specify that a given entity is shared among multiple tenants of an application.

Property Description Default Available for Entity Type

Multitenancy strategy

Specify the multitenant strategy to use:

  • Single table

  • Table per tenant

  • VPD

Single table

Entity and Mapped superclass

Include criteria

Specify if the database requires the tenant criteria to be added to the SELECT, UPDATE, and DELETE queries.

True

Entity and Mapped superclass

Tenant descriptor columns

Use to limit what a persistence context can access in single-table mulitenancy


Entity and Mapped superclass

Override default




Name

The name of column to be used for the tenant discriminator.

eclipselink.tenant-id


Table

The name of the table that contains the column.



Context property

The name of the context property to apply to the tenant discriminator column.



Discriminator type

The type of object/column to use as a class discriminator:

  • Character

  • Integer

  • String

String


Length

The column length for String-based discriminator types.



Column definition

The SQL fragment that is used when generating the DDL for the discriminator column.



Primary key

Specifies that the tenant discriminator column is part of the primary key of the tables.

False



Related reference