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

From: Linda DeMichiel <>
Date: Tue, 10 Apr 2012 09:52:30 -0700

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.