Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/Indigo/Multi-Tenancy"

(Things to talk about)
Line 11: Line 11:
 
=== Requirements ===
 
=== Requirements ===
  
 +
 +
=== Configuration ===
 +
 +
The tenant id field and a tenant id value will be configured through EclipseLink properties within the persistence.xml file.
 +
 +
* eclipselink.multi-tenant.id
 +
* eclipselink.multi-tenant.id-column
 +
 +
When a multi-tenant id is specified, the multi-tenant column will default to "TENANT_ID" if it is not specified by the user. That column is then expected to be available from the following tables of the schema:
 +
 +
## @Table
 +
 +
It is not expected for the following tables:
 +
 +
## @SecondaryTable?
 +
## @CollectionTable
 +
## @JoinTable
 +
 +
When using DDL generation, the user need not worry about this. The DDL generation framework will be responsible for ensuring all necessary tables have a tenant id column.
  
 
=== Things to talk about ===
 
=== Things to talk about ===

Revision as of 11:38, 9 February 2011

See bug??? Bug 335601

Multi-Tenancy

The goal of this feature is to allow multiple tenants on the same database schema.

Requirements

Configuration

The tenant id field and a tenant id value will be configured through EclipseLink properties within the persistence.xml file.

  • eclipselink.multi-tenant.id
  • eclipselink.multi-tenant.id-column

When a multi-tenant id is specified, the multi-tenant column will default to "TENANT_ID" if it is not specified by the user. That column is then expected to be available from the following tables of the schema:

    1. @Table

It is not expected for the following tables:

    1. @SecondaryTable?
    2. @CollectionTable
    3. @JoinTable

When using DDL generation, the user need not worry about this. The DDL generation framework will be responsible for ensuring all necessary tables have a tenant id column.

Things to talk about

  • configuration
    • persistence.xml
    • tenant id
    • tenant id field
  • Core details
  • DDL generation

Back to the top