question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DataStore API Updating _version field can not be set from the client.

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
aleckztscommented, May 26, 2020

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

0reactions
github-actions[bot]commented, Nov 2, 2022

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Datastore release notes - Documentation - Google Cloud
This page documents production updates to Datastore. You can periodically check this page for announcements about new or updated features, bug fixes, known ......
Read more >
DataStore - How it works - JavaScript - AWS Amplify Docs
Amplify DataStore provides a persistent on-device storage repository for you to write, read, and observe changes to data if you are online or...
Read more >
App Architecture: Data Layer - DataStore - Android Developers
DataStore is ideal for small, simple datasets and does not support partial updates or referential integrity. Preferences DataStore and Proto ...
Read more >
Conflict Detection and Sync - AWS AppSync
This field should be configured as the DynamoDB TTL Attribute. ... might be attempting to update the item but with an older version...
Read more >
Cloud Datastore Go Reference - Go Packages
Package datastore provides a client for Google Cloud Datastore. ... The actual types passed do not have to match between Get and Put...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found