[jpa-spec users] [jsr338-experts] Re: support for multitenancy

From: Steve Ebersole <>
Date: Tue, 10 Apr 2012 12:14:17 -0500

So your assumption is that in a SHARED_TABLE approach, all tables: (a)
would be shared (no mixing multitenant and non-) and (b) would have the
same "tenant column" name?

Specifically, you are assuming that 2 tables could not have different
"tenant column" names?

On Tue 10 Apr 2012 11:52:30 AM CDT, Linda DeMichiel wrote:
> On 4/10/2012 9:48 AM, Steve Ebersole wrote:
>>>> Will we at least have a standardized annotation for mapping the
>>>> "tenant identifier" column?
>>> Certainly when we standardize on this approach. I'm not seeing why it
>>> is essential
>>> in purely application-managed SaaS however. Is it? If so, why?
>> In this SHARED_TABLE approach the table *will* have a column that
>> identifies to which tenant a particular row's data
>> belongs. This column has to be named. How else where you propsing
>> that the JPA provider be made aware of this column name?
> In the expected case, the JPA provider knows that it is managing a
> shared table approach, so it
> can generate the column.
>> Obviously if JPA 2.1 is not going to be supporting this SHARED_TABLE
>> approach at all, this is "not needed". I am just
>> assuming that other providers will be supporting this as well
>> (Hibernate will) and it seems to me that standardizing
>> this annotation up front saves end-user migration later.