Package com.sap.cds.feature.mt
Interface DatabaseSchemaIdProvider
- All Superinterfaces:
com.sap.cds.services.runtime.CdsProvider<DatabaseSchemaIdProvider>
@Beta
public interface DatabaseSchemaIdProvider
extends com.sap.cds.services.runtime.CdsProvider<DatabaseSchemaIdProvider>
Determines the database schema ID for the given
UserInfo context. By default CAP uses the
tenant ID (UserInfo.getTenant()) as database schema ID. This provider allows adjusting
the mapping from UserInfo to database schema ID. Most commonly this is used in shared
tenancy scenarios with discriminator column to allow multiple tenants to be mapped to the same
database schema ID.-
Method Summary
Methods inherited from interface com.sap.cds.services.runtime.CdsProvider
setPrevious
-
Method Details
-
get
Returns the database schema ID for the givenUserInfocontext.- Parameters:
userInfo- theUserInfoforBinding- the name of the binding (from which the multitenant DataSource was created)- Returns:
- the database schema ID
-