Class: ModelRefCustom<T>
Extends
ModelRef
<T
>
Type parameters
• T extends CoreModel
Constructors
new ModelRefCustom(uuid, model, data, parent)
new ModelRefCustom<
T
>(uuid
,model
,data
,parent
):ModelRefCustom
<T
>
Parameters
• uuid: string
• model: CoreModelDefinition
<T
>
• data: any
• parent: CoreModel
Returns
Overrides
Source
packages/core/src/models/coremodel.ts:603
Properties
model
protected
model:CoreModelDefinition
<T
>
Inherited from
Source
packages/core/src/models/coremodel.ts:438
parent
protected
parent:CoreModel
Inherited from
Source
packages/core/src/models/coremodel.ts:440
store
protected
store:Store
<T
,StoreParameters
,StoreEvents
>
Inherited from
Source
packages/core/src/models/coremodel.ts:436
uuid
uuid:
string
Inherited from
Source
packages/core/src/models/coremodel.ts:604
Methods
conditionalPatch()
conditionalPatch(
updates
,conditionField
,condition
):Promise
<boolean
>
Parameters
• updates: Partial
<T
>
• conditionField: any
• condition: any
Returns
Promise
<boolean
>
Inherited from
Source
packages/core/src/models/coremodel.ts:528
delete()
delete():
Promise
<void
>
Returns
Promise
<void
>
Inherited from
Source
packages/core/src/models/coremodel.ts:525
deleteItemFromCollection()
deleteItemFromCollection(
prop
,index
,itemWriteCondition
,itemWriteConditionField
?):Promise
<ModelRefCustom
<T
>>
Parameters
• prop: FilterAttributes
<T
, any
[]>
• index: number
• itemWriteCondition: any
• itemWriteConditionField?: string
Returns
Promise
<ModelRefCustom
<T
>>
Inherited from
ModelRef
.deleteItemFromCollection
Source
packages/core/src/models/coremodel.ts:467
exists()
exists():
Promise
<boolean
>
Returns
Promise
<boolean
>
Inherited from
Source
packages/core/src/models/coremodel.ts:522
get()
get(
context
?):Promise
<T
>
Parameters
• context?: OperationContext
<any
, any
>
Returns
Promise
<T
>
Inherited from
Source
packages/core/src/models/coremodel.ts:451
getUuid()
getUuid():
string
Returns
string
Overrides
Source
packages/core/src/models/coremodel.ts:616
incrementAttributes()
incrementAttributes(
info
):Promise
<ModelRefCustom
<T
>>
Parameters
• info: Object
[]
Returns
Promise
<ModelRefCustom
<T
>>
Inherited from
Source
packages/core/src/models/coremodel.ts:553
patch()
patch(
updates
):Promise
<boolean
>
Parameters
• updates: Partial
<T
>
Returns
Promise
<boolean
>
Inherited from
Source
packages/core/src/models/coremodel.ts:531
removeAttribute()
removeAttribute(
attribute
,itemWriteCondition
?,itemWriteConditionField
?):Promise
<ModelRefCustom
<T
>>
Parameters
• attribute: keyof T
• itemWriteCondition?: any
• itemWriteConditionField?: keyof T
Returns
Promise
<ModelRefCustom
<T
>>
Inherited from
Source
packages/core/src/models/coremodel.ts:538
set()
set(
id
):void
Parameters
• id: string
| T
Returns
void
Inherited from
Source
packages/core/src/models/coremodel.ts:454
setAttribute()
setAttribute(
attribute
,value
):Promise
<ModelRefCustom
<T
>>
Parameters
• attribute: keyof T
• value: any
Returns
Promise
<ModelRefCustom
<T
>>
Inherited from
Source
packages/core/src/models/coremodel.ts:534
toJSON()
toJSON():
any
Returns
any
Overrides
Source
packages/core/src/models/coremodel.ts:613
toString()
toString():
string
Returns
string
Inherited from
Source
packages/core/src/models/coremodel.ts:458
upsertItemToCollection()
upsertItemToCollection(
prop
,item
,index
?,itemWriteCondition
?,itemWriteConditionField
?):Promise
<ModelRefCustom
<T
>>
Parameters
• prop: FilterAttributes
<T
, any
[]>
• item: any
• index?: number
• itemWriteCondition?: any
• itemWriteConditionField?: string
Returns
Promise
<ModelRefCustom
<T
>>
Inherited from
ModelRef
.upsertItemToCollection