Skip to main content

Function: many()

many(target, options)

many<T>(target: Newable<T>, options?: ManyOptions<T>): Property<T[]>

Adds a collection navigation property to the entity and allows for configuration of the property.

Type Parameters

Type Parameter
T extends object

Parameters

ParameterTypeDescription
targetNewable<T>The target entity class.
options?ManyOptions<T>The options for the collection navigation property.

Returns

Property<T[]>

Defined in

packages/verse-core/src/model/builder.ts:755

many(target, options)

many<T>(target: EntityModel<T, any>, options?: ManyOptions<T>): Property<Partial<UnwrapProperties<T>>[]>

Adds a collection navigation property to the entity and allows for configuration of the property.

Type Parameters

Type Parameter
T extends object

Parameters

ParameterTypeDescription
targetEntityModel<T, any>The target entity model.
options?ManyOptions<T>The options for the collection navigation property.

Returns

Property<Partial<UnwrapProperties<T>>[]>

Defined in

packages/verse-core/src/model/builder.ts:762

many(target, options)

many<T>(target: string, options?: ManyOptions<T>): Property<T[]>

Adds a collection navigation property to the entity and allows for configuration of the property.

Type Parameters

Type Parameter
T extends object

Parameters

ParameterTypeDescription
targetstringThe target entity name.
options?ManyOptions<T>The options for the collection navigation property.

Returns

Property<T[]>

Defined in

packages/verse-core/src/model/builder.ts:772