dyna-record
    Preparing search index...

    Class EntityMetadata

    Represents metadata for an entity within the ORM system, encapsulating information about the entity's attributes, relationships, and its associated database table.

    The constructor function of the entity class this metadata belongs to.

    The name of the table class instance that maps to the database table of the entity.

    Index

    Constructors

    Properties

    A storage mapping for attribute metadata, keyed by entity field names, enabling lookup of attribute configurations.

    EntityClass: EntityClass

    The constructor function of the entity class, allowing instantiation and further metadata enrichment.

    idField?: string

    Optional attribute of an entity, used with

    decorator when an entity has a custom id field

    A storage for relationship metadata, facilitating the management of entity relationships.

    tableAttributes: AttributeMetadataStorage

    A storage mapping for attribute metadata, keyed by table column names (aliases), used for database interactions.

    tableClassName: string

    The name of the table class instance to which this entity is mapped, providing a link between the entity and its database table.

    Accessors

    Methods

    • Partial parse raw entity defined attributes (not reserved/relationship attributes) from input and ensure they are entity defined attributes. This is similar to parseRawEntityDefinedAttributes but will do a partial validation, only validating the entity defined attributes that are present and not rejected if fields are missing. Any reserved attributes such as primary key, sort key, id, type ,createdAt, updatedAt etc will be omitted. If any attributes do not match their schema, a ValidationError is thrown

      Parameters

      Returns Partial<EntityDefinedAttributes<default>>