Function: one()
one(target, options)
one<
T
>(target
:string
|Newable
<T
> |EntityModel
<T
,any
>,options
: {nullable
:true
; } &OneOptions
<T
>):Property
<T
|undefined
|null
>
Adds a nullable reference navigation property to the entity and allows for configuration of the property.
Type Parameters
Type Parameter |
---|
T extends object |
Parameters
Parameter | Type | Description |
---|---|---|
target | string | Newable <T > | EntityModel <T , any > | The target entity class or name. |
options | {nullable : true ; } & OneOptions <T > | The options for the reference navigation property. |
Returns
Property
<T
| undefined
| null
>
Defined in
packages/verse-core/src/model/builder.ts:814
one(target, options)
one<
T
>(target
:string
|Newable
<T
> |EntityModel
<T
,any
>,options
?:OneOptions
<T
>):Property
<T
>
Adds a reference navigation property to the entity and allows for configuration of the property.
Type Parameters
Type Parameter |
---|
T extends object |
Parameters
Parameter | Type | Description |
---|---|---|
target | string | Newable <T > | EntityModel <T , any > | The target entity class or name. |
options ? | OneOptions <T > | The options for the reference navigation property. |
Returns
Property
<T
>