ReadonlyattributesA storage mapping for attribute metadata, keyed by entity field names, enabling lookup of attribute configurations.
ReadonlyEntityThe constructor function of the entity class, allowing instantiation and further metadata enrichment.
Optional attribute of an entity, used with
ReadonlyrelationshipsA storage for relationship metadata, facilitating the management of entity relationships.
ReadonlytableA storage mapping for attribute metadata, keyed by table column names (aliases), used for database interactions.
ReadonlytableThe name of the table class instance to which this entity is mapped, providing a link between the entity and its database table.
Returns all relationship metadata for the entity
Returns the BelongsToRelationship and OwnedByRelationship metadata objects for an entity
Returns the BelongsToRelationship (bidirectional to parent) metadata for the entity
Returns attribute metadata for attributes that reference a foreign entity via ForeignKeyAttribute. The returned metadata guarantees a non-null ForeignKeyAttributeMetadata.foreignKeyTarget.
Returns the "Has" relationship metadata for the entity (EX: "HasMany")
Returns the OwnedByRelationship (unidirectional to parent) relationship metadata for an entity
Returns foreign key attributes that are not linked through a relationship decorator. These attributes rely on standalone referential integrity checks during create and update operations.
Add attribute metadata to an entity
Parse raw entity defined attributes (not reserved/relationship attributes) from input and ensure they are entity defined attributes. 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
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
Represents metadata for an entity within the ORM system, encapsulating information about the entity's attributes, relationships, and its associated database table.
Param: entityClass
The constructor function of the entity class this metadata belongs to.
Param: tableClassName
The name of the table class instance that maps to the database table of the entity.