amplify-js: DataStore API Updating _version field can not be set from the client.

Describe the bug Using the DataStore API I am unable to update a model as described in the docs. It is only updating the local model and not syncing it with the cloud.

To Reproduce

const original = await DataStore.query(Event, e => e.id('eq', id))
await DataStore.save(
  Event.copyOf(original, (updated) => {
    Object.assign(updated, item)
  })
)

Expected behavior

  1. Update of the local model
  2. Sync with the cloud

Screenshots Bildschirmfoto 2020-04-16 um 21 43 36

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (7 by maintainers)

Most upvoted comments

Updated CLI and libraries, removed all @key(fields: ["id"]) from schema and updates are working now. The others @keys seems to be not interfering.