Per-entity overrides keyed by the entity name passed to
IRepository.getRepository.
The only override exercised today is primaryKey, which replaces the
hardcoded 'id' column the adapter reads when building findById/
update/delete predicates. An absent entry falls back to ['id'],
preserving the prior behaviour (including its refuse-by-name when id is
missing from the table).
Example 1
Example 1
import { DatabasePlugin } from '@setu-ts/database-plugin'; app.register(DatabasePlugin({ type: 'drizzle', options: { drizzleInstance: createDrizzleDatabase(db, bridge), drizzleTables: { Tenant: tenants, TenantFlag: tenantFlags }, entities: { TenantFlag: { primaryKey: ['tenantId', 'flag'] }, }, }, }));
Readonly<Record<string, DrizzleCompositeKeyOptions>>