-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing remote relationship after offline retry #267
Comments
Makes sense as retries will attempt to send the exact same original request. Changes after that are not captured. I'm not sure, maybe we should re-serialize the updated model |
Need to decide whether to re-serialize the updated model |
@frank06 Thanks for the Good work again on this great package. When I was starting my project I was stack at which backend to use either Custom REST API (FastAPI) or firebase but then came across So Kindly I request you link it among compatible/supported backends of |
@alexrothm @frank06 I think this issue traces back to the fact that the offline version of the saved model doesn't have an id until assigned by the remote adapter when back online hence causing relationship issues since they [in my thinking] solely depend on model ids. I managed to notice this when I used this package in a completely offline app, everything worked fine initially but after a few navigations or restarts the relationships where lost and when I assigned auto ids to them they persisted even after restarts. |
Hi, when creating objects with relationships directly one after the other, or in offline mode, the remote server does not have the relationship after posting data via the retry offlineOperation.
I have two models. Crop and Cultivar. Crops can have multiple Cultivars and Cultivars may be assigned to a Crop.
When I do the following only the local repository has the relationship saved. The remote one does not save any id for the corresponding crop:
When a change the function to async and add
await
before each save the relation is stored correctly.But, when I shut down the remote server and the offline functionality retries both posts. The crop id is empty for the
newCultivar
.Summary:
The desiged objects should look like this:
but in offline mode or without using async + await I get this instead:
I appreciate any help.
The text was updated successfully, but these errors were encountered: