Setu-TS
    Preparing search index...

    Interface PrismaCompositeKeyOptions

    Per-entity overrides for the Prisma adapter.

    Used to customise how the adapter addresses compound-key fields on a Prisma model — in particular the PrismaCompositeKeyOptions.compositeKeyName override that is mandatory when a model uses a named @@id constraint.

    0.2.0

    interface PrismaCompositeKeyOptions {
        compositeKeyName?: string;
        keyColumns?: readonly string[];
    }
    Index
    compositeKeyName?: string

    Override for the derived compound-key field name.

    Prisma generates an unnamed @@id([a, b]) as a_b; a named @@id([...], name: "custom") generates only custom. When the derived name does not match the schema (e.g. a named @@id), set this to the Prisma-side generated field name so findById/update/delete emit the correct compound-key where argument.

    0.2.0

    keyColumns?: readonly string[]

    The primary-key columns for this entity, in Prisma schema declaration order.

    Required when compositeKeyName is set: the adapter needs the column names to build the compound-key object that Prisma expects inside the where argument. Omitting it while naming a compositeKeyName leaves the columns at the scalar default ['id'], and every composite key is refused for missing the id column — measured against live PostgreSQL in the M79 live suite. Supply every column, in declaration order, for both unnamed @@id (derived field tenantId_userId) and named @@id models.

    Defaults to ['id'] when absent (scalar-key path).

    // Named @@id: columns must be supplied explicitly.
    entities: {
    Enrollment: { compositeKeyName: 'enrollmentKey', keyColumns: ['courseId', 'personId'] },
    }

    0.2.0