Skip to main content
Module

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

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

Contains all information about entity's relation count.

Constructors

new
RelationCountMetadata(options: { entityMetadata: EntityMetadata; args: RelationCountMetadataArgs; })

Properties

optional
alias: string

Alias of the joined (destination) table.

entityMetadata: EntityMetadata

Entity metadata where this column metadata is.

propertyName: string

Target's property name to which this metadata is applied.

optional
queryBuilderFactory: (qb: SelectQueryBuilder<any>) => SelectQueryBuilder<any>

Extra condition applied to "ON" section of join.

relation: RelationMetadata

Relation which needs to be counted.

relationNameOrFactory: string | ((object: any) => any)

Relation name which need to count.

target: Function | string

Target class to which metadata is applied.

Methods

Builds some depend relation count metadata properties. This builder method should be used only after entity metadata, its properties map and all relations are build.