Function: oneToOne()

oneToOne(entity, options)

oneToOne<TTarget, TOwner>(entity, options?): OneToOneProperty<TTarget, TOwner>

Type Parameters

TTarget extends object

TOwner

Parameters

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

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

Returns

OneToOneProperty<TTarget, TOwner>

Defined in

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

oneToOne(entity, options)

oneToOne<TTarget, TOwner>(entity, options?): OneToOneProperty<TTarget, TOwner> & WithNullable

Type Parameters

TTarget extends object

TOwner

Parameters

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

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

Returns

OneToOneProperty<TTarget, TOwner> & WithNullable

Defined in

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