Function: updateRelation()
updateRelation<
C
,E
,D
,RD
,I
,K
,Record
,Related
,Data
>(instance
,relation
,value
,actionName
): (action
) =>Promise
<Action
<C
&ConsumeModel
<Model
<D
,I
>> &ConsumeRelation
<RD
[K
]> &ConsumeId
,E
>>
Type parameters
• C extends object
• E extends object
• D extends object
• RD extends ModelSchemaRelations
<D
>
• I extends ModelInstance
<D
>
• K extends string
• Record
• Related
• Data
Parameters
• instance: ModelClassInstance
<D
> & I
• relation: ModelRelationKey
<D
> & K
• value: ModelInferPropValue
<RD
[K
]> | NonNullable
<ModelInferPropValue
<RD
[K
]>>[number
]
• actionName: UpdateRelationActionName
= ActionName.UPDATE_RELATION
Returns
Function
Parameters
• action: Action
<C
& ConsumeSerializer
<Record
, Related
, Data
>, E
>
Returns
Promise
<Action
<C
& ConsumeModel
<Model
<D
, I
>> & ConsumeRelation
<RD
[K
]> & ConsumeId
, E
>>
Source
packages/core/src/actions/context/enhancers/crud/updateRelation.ts:59