Model.$update(
{ where : 1 },
data : {
field: 'value'}
)
I'm receiving the following error:
Uncaught (in promise) TypeError: result[entity].forEach is not a function
The error is referring to the result[entity].forEach( ... ) on line 18 of src/actions/Persist.js, and when executing a $update, entity in result[entity] contains the string value $id. The contents of result are is the model in question.
Repeating this through the debugger with a Model.$create, the contents of entity is the string value operations, and result is an object with key operations holding an array of values that should be saved.
The value is not updated in the database, nor in vuex itself when using $update, while $create works without errors or issues.
When updating data with the following:
I'm receiving the following error:
Uncaught (in promise) TypeError: result[entity].forEach is not a function
The error is referring to the
result[entity].forEach( ... )
on line 18 ofsrc/actions/Persist.js
, and when executing a$update
,entity
inresult[entity]
contains the string value$id
. The contents ofresult
are is the model in question.Repeating this through the debugger with a
Model.$create
, the contents ofentity
is the string valueoperations
, and result is an object with keyoperations
holding an array of values that should be saved.The value is not updated in the database, nor in vuex itself when using
$update
, while$create
works without errors or issues.