Guy, 
     
    Looking at the example: 
    @Entity
@Table(name=“EMP”)
@Multitenant(
  type = SINGLE_TABLE,
  tenantDiscriminators = @TenantDiscriminator(name=“tenant-id”, columnName=“TENANT_ID”)
)
I am not sure I like the discriminators being within the @Multitenant annotation. It implies that all strategies will have a TennatDiscriminator with the same structure.
The idea was to mimic the inheritance which is configured like:
@Entity
@Table(name="CUST")
@Inheritance(strategy=SINGLE_TABLE)
@DiscriminatorColumn(name="DISC", discriminatorType=STRING,length=20)
@DiscriminatorValue("CUSTOMER")
So, I was thinking we could do something like:
@Entity
@Table(name="EMP")
@Multitenant(strategy=SINGLE_TABLE)
@TenantDiscriminatorColumn(name="COMPANY", discriminatorType=STRING,length=20, property="company-id")
This sets us up for handling multitenancy where each tenant's rows for a given entity arte stored in different tables identified with different names or schema.
@Entity
@Multitenant(strategy=TABLE_PER_TENANT)
@TenantTableDiscriminator(???)
Doug
    On 14/03/2011 3:51 PM, Guy Pelletier wrote:
    
      
      I've gone through another round of updating the
        multi-tenancy doc. 
         
      http://wiki.eclipse.org/EclipseLink/Development/Indigo/Multi-Tenancy 
         
      It is still a work in progress, however I
        think we are getting closer. Please review and provide any
        feedback. 
         
        Thanks, 
        Guy 
      
 
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
     
  
 |