1 | import { RelationIdMetadataArgs } from "../metadata-args/RelationIdMetadataArgs";
|
2 | import { EntityMetadata } from "./EntityMetadata";
|
3 | import { RelationMetadata } from "./RelationMetadata";
|
4 | import { SelectQueryBuilder } from "../query-builder/SelectQueryBuilder";
|
5 | import { ObjectLiteral } from "../common/ObjectLiteral";
|
6 |
|
7 |
|
8 |
|
9 | export declare class RelationIdMetadata {
|
10 | |
11 |
|
12 |
|
13 | entityMetadata: EntityMetadata;
|
14 | |
15 |
|
16 |
|
17 | relation: RelationMetadata;
|
18 | |
19 |
|
20 |
|
21 | relationNameOrFactory: string | ((object: any) => any);
|
22 | /**
|
23 | * Target class to which metadata is applied.
|
24 | */
|
25 | target: Function | string;
|
26 | /**
|
27 | * Target's property name to which this metadata is applied.
|
28 | */
|
29 | propertyName: string;
|
30 | /**
|
31 | * Alias of the joined (destination) table.
|
32 | */
|
33 | alias?: string;
|
34 | /**
|
35 | * Extra condition applied to "ON" section of join.
|
36 | */
|
37 | queryBuilderFactory?: (qb: SelectQueryBuilder<any>) => SelectQueryBuilder<any>;
|
38 | constructor(options: {
|
39 | entityMetadata: EntityMetadata;
|
40 | args: RelationIdMetadataArgs;
|
41 | });
|
42 | /**
|
43 | * Sets relation id value from the given entity.
|
44 | *
|
45 | * todo: make it to work in embeds as well.
|
46 | */
|
47 | setValue(entity: ObjectLiteral): void;
|
48 | /**
|
49 | * Builds some depend relation id properties.
|
50 | * This builder method should be used only after entity metadata, its properties map and all relations are build.
|
51 | */
|
52 | build(): void;
|
53 | }
|