You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to support offline save operations with save eventually and I am running into an issue.
Let's say I have a TodoList class which has a relations to TodoListItem. What I would like to do when a new item is created is to create a relation between todoList and the new object, then save the new todoList
by calling todoList.saveEventually(), Right now it fails with Tried to save an object with a new, unsaved child. (Code: -1, Version: 1.19.1).
It fails because the object to be saved doesn't have an object id, but thats expected as it was created offline. We can't just enqueue two save eventually operations as both happen async and it is a race condition. Ideally we would create a callback from save eventually to do it, but as I said its offline so there is a very strong chance the completion block isn't around when the call completes.
Is there a way to support saving nested objects while offline?
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. If you believe it should stay open, please let us know! As always, we encourage contributions, check out the Contributing Guide
I am trying to support offline save operations with save eventually and I am running into an issue.
Let's say I have a TodoList class which has a relations to TodoListItem. What I would like to do when a new item is created is to create a relation between todoList and the new object, then save the new todoList
by calling
todoList.saveEventually()
, Right now it fails withTried to save an object with a new, unsaved child. (Code: -1, Version: 1.19.1)
.It fails because the object to be saved doesn't have an object id, but thats expected as it was created offline. We can't just enqueue two save eventually operations as both happen async and it is a race condition. Ideally we would create a callback from save eventually to do it, but as I said its offline so there is a very strong chance the completion block isn't around when the call completes.
Is there a way to support saving nested objects while offline?
The text was updated successfully, but these errors were encountered: