I have gone through EclipseLink Single Table Multi-Tenancy feature spec.
BELOW is some portion by reading, I am little bit surprised.
Task 4: Perform Operations and Queries
The tenant discriminator column is used at runtime through entity manager operations and querying. The tenant discriminator column and value are supported through the following entity manager operations:
persist()
find()
refresh()
The tenant discriminator column and value are supported through the following queries:
Named queries
Update all
Delete all
Why TENANT_ID is not used at runtime for below operations.
merge()
delete()
Why It is not needed for below operations? I need it because when updating any record , I need to append TENANT_ID in WHERE clause of UPDATE query. Because, In a single table multi-tenancy, there will be users with same user for more than one tenant and I need TENANT_ID to update only specific tenant record.
Please help me in this, as I am stuck only in merge() operation.