prorm API Reference
    Preparing search index...

    Class ForeignKeyConstraintError

    Error for foreign key constraint violations

    Hierarchy (View Summary)

    Index
    • Parameters

      • message: string = 'Foreign key constraint violation'
      • options: {
            code?: ErrorCode;
            field?: string;
            table?: string;
            value?: unknown;
            parent?: Error;
            sql?: string;
        } = {}

      Returns ForeignKeyConstraintError

    code: ErrorCode

    Unique error code for programmatic handling

    parent?: Error

    Original error that caused this error

    sql?: string

    SQL query that caused the error

    metadata?: Record<string, unknown>

    Additional error properties

    field?: string

    The foreign key field that caused the violation

    table?: string

    The table that references the foreign key

    value?: unknown

    The value that was used