Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/typeorm/src/metadata/EmbeddedMetadata.ts>EmbeddedMetadata

Forked from https://github.com/typeorm/typeorm
Latest
class EmbeddedMetadata
import { EmbeddedMetadata } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/metadata/EmbeddedMetadata.ts";

Contains all information about entity's embedded property.

Constructors

new
EmbeddedMetadata(options: { entityMetadata: EntityMetadata; args: EmbeddedMetadataArgs; })

Properties

columns: ColumnMetadata[]

Columns inside this embed.

columnsFromTree: ColumnMetadata[]

Embed metadatas from all levels of the parent tree.

example: post[data][information][counters].id where "data", "information" and "counters" are embeds this method will return [embed metadata of data, embed metadata of information, embed metadata of counters]

customPrefix: string | boolean | undefined

Prefix of the embedded, used instead of propertyName. If set to empty string or false, then prefix is not set at all.

embeddedMetadataTree: EmbeddedMetadata[]

Returns embed metadatas from all levels of the parent tree.

example: post[data][information][counters].id where "data", "information" and "counters" are embeds this method will return [embed metadata of data, embed metadata of information, embed metadata of counters]

embeddeds: EmbeddedMetadata[]

Nested embeddable in this embeddable (which has current embedded as parent embedded).

entityMetadata: EntityMetadata

Entity metadata where this embedded is.

indices: IndexMetadata[]

Indices applied to the embed columns.

indicesFromTree: IndexMetadata[]

Indices of this embed and all indices from its child embeds.

isArray: boolean

Indicates if this embedded is in array mode.

This option works only in mongodb.

Entity listeners inside this embed.

listenersFromTree: EntityListenerMetadata[]

Relations of this embed and all relations from its child embeds.

optional
parentEmbeddedMetadata: EmbeddedMetadata

Parent embedded in the case if this embedded inside other embedded.

parentPrefixes: string[]

Returns array of prefixes of current embed and all its parent embeds.

parentPropertyNames: string[]

Returns array of property names of current embed and all its parent embeds.

example: post[data][information][counters].id where "data", "information" and "counters" are embeds we need to get value of "id" column from the post real entity object. this method will return ["data", "information", "counters"]

prefix: string

Gets the prefix of the columns. By default its a property name of the class where this prefix is. But if custom prefix is set then it takes its value as a prefix. However if custom prefix is set to empty string or false, then prefix to column is not applied at all.

propertyName: string

Property name on which this embedded is attached.

propertyPath: string

Gets full path to this embedded property (including embedded property name). Full path is relevant when embedded is used inside other embeds (one or multiple nested). For example it will return "counters.subcounters".

relationCounts: RelationCountMetadata[]

Relation counts inside this embed.

relationCountsFromTree: RelationCountMetadata[]

Relation counts of this embed and all relation counts from its child embeds.

relationIds: RelationIdMetadata[]

Relation ids inside this embed.

relationIdsFromTree: RelationIdMetadata[]

Relation ids of this embed and all relation ids from its child embeds.

relations: RelationMetadata[]

Relations inside this embed.

relationsFromTree: RelationMetadata[]

Relations of this embed and all relations from its child embeds.

type: Function

Embedded target type.

uniques: UniqueMetadata[]

Uniques applied to the embed columns.

uniquesFromTree: UniqueMetadata[]

Uniques of this embed and all uniques from its child embeds.