davduke
davduke

Reputation: 3

Eclipselink Multitenancy and Tenants Hierarchy (shared some data)

I'm interested to use my Java+Struts+Spring+EclipseLink application with multitenancy, I did some examples to provide multitenancy and everthing was ok. But...

I have a equirement that could be possible this situation:

A real example could be a company with differents deparments using my application but some departments can see other data.

For insert data I think I can manage my code with @Multitenant(MultitenantType.SINGLE_TABLE) but I dont't know if the part of filter data is possible to be managed with eclipseLink or what solution I can use.

Upvotes: 0

Views: 293

Answers (1)

James
James

Reputation: 18389

You may want to have a different persistence unit for each tenant, and provide different configuration for each.

You could also not use @Multitenant but use @AdditionalCriteria instead, or application logic.

Upvotes: 0

Related Questions