Listener metadatas with "AFTER INSERT" type.
Listener metadatas with "AFTER LOAD" type.
Listener metadatas with "AFTER REMOVE" type.
Listener metadatas with "AFTER UPDATE" type.
All embeddeds - embeddeds from this entity metadata and from all child embeddeds, etc.
Ancestor columns used only in closure junction tables.
Listener metadatas with "AFTER INSERT" type.
Listener metadatas with "AFTER REMOVE" type.
Listener metadatas with "AFTER UPDATE" type.
Entity's check metadatas.
Children entity metadatas. Used in inheritance patterns.
If entity's table is a closure-typed table, then this entity will have a closure junction table metadata.
Columns of the entity, including columns that are coming from the embeddeds of this entity.
Connection where this entity metadata is created.
Gets entity column which contains a create date value.
Database name.
Descendant columns used only in closure junction tables.
Gets the discriminator column used to store entity identificator in single-table inheritance tables.
If this entity metadata is a child table of some table, it should have a discriminator value. Used to store a value in a discriminator column.
List of eager relations this metadata has.
Entity's embedded metadatas.
Table's database engine type (like "InnoDB", "MyISAM", etc).
Entity's foreign key metadatas.
Gets the column with generated flag.
Original user-given table name (taken from schema or @Entity(tableName) decorator). If user haven't specified a table name this property will be undefined.
Checks if entity's table has multiple primary columns.
Checks if there any non-nullable column exist in this entity.
Indicates if this entity metadata has uuid generated columns.
Entity's index metadatas.
If this entity metadata's table using one of the inheritance patterns, then this will contain what pattern it uses.
All "inheritance tree" from a target entity. For example for target Post < ContentModel < Unit it will be an array of [Post, ContentModel, Unit]. It also contains child entities for single table inheritance.
In the case if this entity metadata is junction table's entity metadata, this will contain all referenced columns of inverse entity.
Checks if this table is a junction table of the closure table. This type is for tables that contain junction metadata of the closure tables.
Indicates if this entity metadata of a junction table, or not. Junction table is a table created by many-to-many relationship.
Its also possible to understand if entity is junction via tableType.
List of eager relations this metadata has.
Entity listener metadatas.
Gets only many-to-many relations of the entity.
Gets only many-to-one relations of the entity.
Materialized path column. Used only in tree entities with materialized path pattern applied.
Entity's name. Equal to entity target class's name if target is set to table. If target class is not then then it equals to table name.
Nested set's left value column. Used only in tree entities with nested set pattern applied.
Nested set's right value column. Used only in tree entities with nested set pattern applied.
All columns except for virtual columns.
Gets the object id column used with mongodb database.
Gets only one-to-many relations of the entity.
Gets only one-to-one relations of the entity.
Specifies a default order by used for queries from this table when no explicit order by is specified.
Entity's column metadatas defined by user.
Entity's own indices.
Entity's own listener metadatas.
Entity's relation metadatas.
In the case if this entity metadata is junction table's entity metadata, this will contain all referenced columns of owner entity.
Gets only owner many-to-many relations of the entity.
Gets only owner one-to-one relations of the entity.
If this is entity metadata for a junction closure table then its owner closure table metadata will be set here.
Parent's entity metadata. Used in inheritance patterns.
Gets the primary columns.
Map of columns and relations of the entity.
example: Post{ id: number, name: string, counterEmbed: { count: number }, category: Category }. This method will create following object: { id: "id", counterEmbed: { count: "counterEmbed.count" }, category: "category" }
Entity's relation id metadatas.
Entity's relation id metadatas.
Relations of the entity, including relations that are coming from the embeddeds of this entity.
Gets only owner one-to-one and many-to-one relations.
Schema name. Used in Postgres and Sql Server.
Entity schema path. Contains database name and schema name. E.g. myDB.mySchema
Indicates if schema will be synchronized for this entity or not.
Metadata arguments used to build this entity metadata.
Entity table name in the database. This is final table name of the entity. This name already passed naming strategy, and generated based on multiple criteria, including user table name and global table prefix.
Gets the table name without global table prefix. When querying table you need a table name with prefix, but in some scenarios, for example when you want to name a junction table that contains names of two other tables, you may want a table name without prefix.
Entity table path. Contains database name, schema name and table name. E.g. myDB.mySchema.myTable
Table type. Tables can be abstract, closure, junction, embedded, etc.
Target class to which this entity metadata is bind. Note, that when using table inheritance patterns target can be different rather then table's target. For virtual tables which lack of real entity (like junction tables) target is equal to their table name.
Gets the name of the target.
Tree children relation. Used only in tree-tables.
Special column that stores tree level in tree entities.
Tree parent relation. Used only in tree-tables.
Indicates if this entity is a tree, what type of tree it is.
Entity's unique metadatas.
Gets entity column which contains an update date value.
Gets entity column which contains an entity version.
Builds table path using schema name and database name.
Builds table path using database name, schema name and table name.
Compares two different entities by their ids. Returns true if they match, false otherwise.
Creates a new entity.
Creates a special object - all columns and relations of the object (plus columns and relations from embeds) in a special format - { propertyName: propertyName }.
example: Post{ id: number, name: string, counterEmbed: { count: number }, category: Category }. This method will create following object: { id: "id", counterEmbed: { count: "counterEmbed.count" }, category: "category" }
Ensures that given object is an entity id map. If given id is an object then it means its already id map. If given id isn't an object then it means its a value of the id column and it creates a new id map with this value and name of the primary column.
Iterates through entity and finds and extracts all values from relations in the entity. If relation value is an array its being flattened.
Finds column with a given database name.
Finds column with a given property name.
Finds column with a given property path.
Finds columns with a given property path. Property path can match a relation, and relations can contain multiple columns.
Finds embedded with a given property path.
Finds relation with the given property path.
Gets primary keys of the entity and returns them in a literal object. For example, for Post{ id: 1, title: "hello" } where id is primary it will return { id: 1 } For multiple primary keys it returns multiple keys in object. For primary keys inside embeds it returns complex object literal with keys in them.
Creates a "mixed id map". If entity has multiple primary keys (ids) then it will return just regular id map, like what getEntityIdMap returns. But if entity has a single primary key then it will return just value of the id column of the entity, just value. This is called mixed id map.
Checks if given entity / object contains ALL primary keys entity must have. Returns true if it contains all of them, false if at least one of them is not defined.
Checks if there is an embedded with a given property path.
Checks if given entity has an id.
Registers a new column in the entity and recomputes all depend properties.
Compares ids of the two entities. Returns true if they match, false otherwise.
Creates a property paths for a given entity.
Finds difference between two entity id maps. Returns items that exist in the first array and absent in the second array.
Creates value map from the given values and columns. Examples of usages are primary columns map and join columns map.
Generated using TypeDoc
Contains all entity metadata.