333
schangxiang@126.com
2025-09-19 18966e02fb573c7e2bb0c6426ed792b38b910940
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { RelationType } from "../metadata/types/RelationTypes";
import { RelationOptions } from "../decorator/options/RelationOptions";
import { PropertyTypeFactory } from "../metadata/types/PropertyTypeInFunction";
import { RelationTypeInFunction } from "../metadata/types/RelationTypeInFunction";
/**
 * Arguments for RelationMetadata class.
 */
export interface RelationMetadataArgs {
    /**
     * Class to which this relation is applied.
     */
    readonly target: Function | string;
    /**
     * In the case if this relation is without a target, targetId must be specified.
     * This is used for entity schemas without classes.
     */
    /**
     * Class's property name to which this relation is applied.
     */
    readonly propertyName: string;
    /**
     * Indicates if this relation will be lazily loaded.
     */
    readonly isLazy: boolean;
    /**
     * Original (reflected) class's property type.
     *
     * todo: this can be empty for relations from entity schemas.
     */
    /**
     * Type of relation. Can be one of the value of the RelationTypes class.
     */
    readonly relationType: RelationType;
    /**
     * Type of the relation. This type is in function because of language specifics and problems with recursive
     * referenced classes.
     */
    readonly type: RelationTypeInFunction;
    /**
     * Inverse side of the relation.
     */
    readonly inverseSideProperty?: PropertyTypeFactory<any>;
    /**
     * Additional relation options.
     */
    readonly options: RelationOptions;
    /**
     * Indicates if this is a parent (can be only many-to-one relation) relation in the tree tables.
     */
    readonly isTreeParent?: boolean;
    /**
     * Indicates if this is a children (can be only one-to-many relation) relation in the tree tables.
     */
    readonly isTreeChildren?: boolean;
}