Interface: EntityEntryApi<Entity>
Methods for managing the state of an entity in a unit of work.
Type Parameters
Type Parameter |
---|
Entity extends object |
Accessors
state
get
state():EntityState
Returns the current state of the entity.
Returns
The state of the entity.
Defined in
packages/verse-core/src/uow.ts:103
Methods
setState()
setState(
state
:EntityState
):void
Sets the state of the entity.
Parameters
Parameter | Type | Description |
---|---|---|
state | EntityState | The state to be set for the entity. |
Returns
void
Defined in
packages/verse-core/src/uow.ts:110
update()
update(
values
:Partial
<Entity
>):void
Updates an entity with the provided values.
Parameters
Parameter | Type | Description |
---|---|---|
values | Partial <Entity > | The values to update the entity with. |
Returns
void
Example
uow.entry(album).update({title: 'Road Games', artist: 'Allan Holdsworth'});