Do not synchronize record or table
See original GitHub issueI am facing two synchronization problems.
1 - I have a table that serves to store application data. I can’t use Watermelon’s LocalStorage. How can I prevent this table from being synchronized.
2 - I have an order page that cannot be sent to the server until the user has entered all the information. The user can close the application and continue with the current order, it happens that until he finishes I cannot send it to the server. The solution I would have at the moment would be to make a ‘new_order’ table to create and then move to the ‘order’, but I would have to create a relationship for two tables, which I don’t think is right, the best would be if I had a status so that I could ignore this record.
I found this problem in the issue, but I don’t know what the solution was: https://github.com/Nozbe/WatermelonDB/issues/206
For the time being in item 2, I’m resolving by placing order._raw._status = 'draft'
I’m doing tests now, I don’t know if it’s going to break something now or in the future.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)

Top Related StackOverflow Question
As there is no way to inform which table I want to synchronize, I created a table that holds temporary data and then sends it to the table I want. And in the synchronization function I delete the temporary table so that it doesn’t go in synchronization.
I believe if we had a way to overwrite
for
fetchLocalis a start…