DataStore API Updating _version field can not be set from the client.
See original GitHub issueDescribe 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
- Update of the local model
- Sync with the cloud
Screenshots
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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.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.