Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Entity id generated from separate schema table in multi-tenant


Hi,
I'm using eclipselink jpa to build multi-tenant(separate schema) web system. Tenants first connect to a default(shared) schema and each of them has a separate schema. Now entity id is generated by table generator, but it will query from the table in shared schema, actually I want that id should be retrived from the table in tenant private schema(all tenanats have the same table in their schema).

I wonder if I can extend @tablegenerator to implement my own id generate logic, and then let JPA invoke the implemention. If the idea is right, could you tell me how to implement or give me some advice.

Thanks.



Back to the top