dyna-record
    Preparing search index...

    Interface ForeignKeyAttributeMetadata

    Attribute metadata for foreign key attributes where AttributeMetadata.foreignKeyTarget is guaranteed. Provides the target entity class so operations can enforce referential integrity even when no relationship metadata exists.

    interface ForeignKeyAttributeMetadata {
        alias: string;
        enumValues?: readonly [string, string];
        foreignKeyTarget: new () => default & typeof default;
        kind: AttributeKind;
        name: string;
        nullable: boolean;
        objectSchema?: ObjectSchema;
        partialType?: ZodType<
            unknown,
            unknown,
            $ZodTypeInternals<unknown, unknown>,
        >;
        serializers?: Serializers;
        type: ZodType;
    }

    Hierarchy (View Summary)

    Index

    Properties

    alias: string

    The name of the attribute as defined in the database table. If not provided, it defaults to the name of the attribute. This alias is used for database operations to map the attribute to its corresponding database column.

    enumValues?: readonly [string, string]
    foreignKeyTarget: new () => default & typeof default

    When present, identifies the entity referenced by a foreign key attribute, enabling referential integrity enforcement.

    name: string

    The name of the attribute as defined on the entity. This serves as the primary identifier for the attribute within the ORM.

    nullable: boolean

    Indicates whether the attribute can be null, defining the attribute's nullability constraint within the database.

    objectSchema?: ObjectSchema
    partialType?: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>
    serializers?: Serializers

    Optional serialization strategies for converting the attribute between its database representation and its entity representation. This is particularly useful for custom data types not natively supported by DynamoDB.

    type: ZodType

    Zod validator to run on the attribute