Multi-tenant setups sometimes have data that is shared between the 
tenants (codec tables, etc).

I think the first question is do we want to support this mixing?  I 
think it is common enough that it is worthwhile to support it.  And I do 
not think it is complicated enough to be painful to implement.  As long 
as we assume that there is some form of database-level availability 
between shared, non-shared data (even for the DATABASE and SCHEMA 
strategies) I think we will be fine.

Assuming we do support it, there is a decision we need to make about how 
we differentiate shared (tenant aware) and non-shared (non-tenant aware) 
data, especially important when we talk about the DISCRIMINATOR approach 
which touches on a more general outstanding decision with regard to 
supporting DISCRIMINATOR multi-tenancy.  Basically whether entities are 
inclusively considered multi-tenant when the user has specified 
DISCRIMINATOR, or whether we expect some form of annotation stating the 
entity is multi-tenant.  Personally, I think the inclusive approach (all 
entities are assumed multi-tenant) is probably the better approach.  In 
which case we need an annotation to say "this entity is not multi-tenant".


-- 
st...@hibernate.org
http://hibernate.org
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to