I would suggest not naming your EmbeddedId class "EmbeddedId". Im guessing this class name was changed to post in your email, but incase it wasnt, it may be worth renaming and retesting since these kind of namespace collisions can lead to non-deterministic behavior when classloading.
Also, I am not familiar with @Multitenant annotation, but taking a look at the wiki (
http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/a_multitenant.htm), two things are listed as for @Multitenant(T
ABLE_PER_TENANT):
To configure table-per-tenant multitenancy, you must specify:
-
A table-per-tenant property to identify the user. This can be set per
entity manager, or it can be set at the entity manager factory to
isolate table-per-tenant per persistence unit.)
-
A tenant table discriminator to identify and isolate the tenant's
tables from other tenants' tables. The discriminator types are SCHEMA
, SUFFIX
, and PREFIX
. For more information about tenant discriminator types, see "@TenantTableDiscriminator".
Maybe someone more familiar with the use of @Multitenant can expand on it's usage.