Libraries v5.0.0
    Preparing search index...

    Interface RelationSpecInternal

    Relation metadata stored via .hasMany(), .belongsTo(), etc.

    interface RelationSpec {
        foreignKey?: any;
        localKey?: string;
        name: string;
        optional?: boolean;
        remoteKey?: string;
        schema: any;
        through?: { foreignKey: string; localKey: string; table: string };
        type: "belongsTo" | "hasOne" | "hasMany" | "belongsToMany";
    }
    Index
    foreignKey?: any
    localKey?: string

    Explicit schema property names used for read correlation.

    name: string
    optional?: boolean

    Nullable belongs-to relations do not filter out their parent rows.

    remoteKey?: string
    schema: any
    through?: { foreignKey: string; localKey: string; table: string }
    type: "belongsTo" | "hasOne" | "hasMany" | "belongsToMany"