| Summary: | Provide admin user access data from multiple tenants | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Morten <hardhousemouse> |
| Component: | Eclipselink | Assignee: | Project Inbox <eclipselink.orm-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | guy.pelletier, hardhousemouse, heruan, juliano.castilho, ketanprajapati88, mauromol, raf4352, tom.ware |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=355093 | ||
| Whiteboard: | |||
|
Description
Morten
I other people with the same problems: http://old.nabble.com/Re%3A-Suggestions-for-approaches-to-security-and-queries--p32068946.html Can you provide any hints on a work-around or where to start looking to create a patch? This issue is a real show-stopper for us, so I would be grateful for any help! Thanks The way to do this currently is to define a new persistence unit with all the same model classes minus the @Multitenant metadata. Converting to Enhancement. The enhancement is to provide a means to query without the tenant criteria without duplicating the persistence unit. I want to use my Multi-Tenant solution without removing/changing annotation or XMl configuration for all entities. In short, even my entities are annotated with @Multi-Tenant and @TenantDiscriminator annotation, but at all even, I do not set PersistenceUnitProperties.MULTITENANT_PROPERTY_DEFAULT then It should just ignore to add TENANT_ID as an additional criteria instead of throwing below exception. javax.persistence.PersistenceException: Exception [EclipseLink-6174] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.QueryException Exception Description: No value was provided for the session property [eclipselink.tenant-id]. This exception is possible when using additional criteria or tenant discriminator columns without specifying the associated contextual property. These properties must be set through Entity Manager, Entity Manager Factory or persistence unit properties. If using native EclipseLink, these properties should be set directly on the session. For more information, please refer http://stackoverflow.com/questions/22562770/eclipselink-how-to-turn-off-multi-tenancy-even-if-i-annotate-entity-with-multi/22597988 Ketan Prajapati The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |