Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be 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/DesignDocs/Extensibility"

(Replacing page with 'Contents moved to [http://wiki.eclipse.org/EclipseLink/DesignDocs/335601 ER 335601]')
 
(56 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''UNDER CONSTRUCTION'''
+
Contents moved to [http://wiki.eclipse.org/EclipseLink/DesignDocs/335601 ER 335601]
 
+
== Extensibility ==
+
 
+
The goal of this feature is to allow a user to start with a predesigned persistence unit and extend the entities in that persistence units with new mappings at runtime.
+
 
+
For example, a simple application is provided that defines a Customer entity that maps  "name" and "customer number". As the application is running, the Customer application can be extended to include a "company name" mapping.
+
 
+
In the above example, the addition of the "company name" is acheived only through interaction with EclipseLink.  EclipseLink should handle schema modifications (if any) and any adjustment to EclipseLink metadata and Session.
+
 
+
== Schema Design for Extensibility ==
+
 
+
The following are some data-model extensibility options
+
 
+
=== Flex Columns ===
+
 
+
Schema is designed to include preallocated columns that can be used to map additional data. 
+
 
+
e.g. Customer table has colums NAME, CUST_NUMB, DATA1, DATA2 etc.  "company name" is mapped to DATA1.
+
 
+
=== Custom Columns ===
+
 
+
EclipseLink alters tables as needed.
+
 
+
e.g. Customer table has colums NAME, CUST_NUMB.  When "company name" is added to Customer, a COMPANY_NAME column is added to the table by EclipseLink using an ALTER TABLE call.
+
 
+
=== Value Rows ===
+
 
+
Extra data is stored in a Map structure.
+
 
+
e.g. Customer table has colums NAME, CUST_NUMB. A table exists with columns ATTR_NAME, ATTR_VALUE, OWNER_ID, OWNING_ENTITY.  That column holds the names of any new attributes, their values, a foreign key to the owner, and a way of determining which Entity the mapping belongs to.
+
 
+
== Metadata ===
+
 
+
=== Metadata Storable ===
+
 
+
DB table store metadata for extended fields.  It is accessed at login time, prior to descriptor initialization.
+
 
+
=== Metadata access ===
+
 
+
Metadata is accessible through an Interface.  (user defined?)
+
 
+
== Multi-tenancy discussion ==
+
 
+
The following multi-tenancy discussion doc was used in the discussion of this feature
+
 
+
[[EclipseLink/DesignDocs/MultiTenantFeatures|Multi Tenant Features: Description of features available and being considered for Multi Tenant APPs]]
+

Latest revision as of 10:23, 16 March 2011

Contents moved to ER 335601

Back to the top