Function: manyToOne()

manyToOne(entity, options)

manyToOne<TTarget, TOwner>(entity, options?): ManyToOneProperty<TTarget, TOwner>

Type Parameters

TTarget extends object

TOwner

Parameters

entity: string | () => EntityName<TTarget>

options?: Omit<ManyToOneOptions<TOwner, TTarget>, "nullable"> & object

Returns

ManyToOneProperty<TTarget, TOwner>

Defined in

packages/mikro-orm/src/entity-schema.ts:375

manyToOne(entity, options)

manyToOne<TTarget, TOwner>(entity, options?): ManyToOneProperty<TTarget, TOwner> & WithNullable

Type Parameters

TTarget extends object

TOwner

Parameters

entity: string | () => EntityName<TTarget>

options?: Omit<ManyToOneOptions<TOwner, TTarget>, "nullable"> & object

Returns

ManyToOneProperty<TTarget, TOwner> & WithNullable

Defined in

packages/mikro-orm/src/entity-schema.ts:381