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.

Do not synchronize record or table

See original GitHub issue

I 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:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
osvaldokalvaitircommented, Nov 11, 2021

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 have something similar to this right now in my application. The user has go through a couple pages before the creation process is complete. I basically just either send the partially completed data through the navigation params or I save the data to AsyncStorage and fetch it later when needed and clear it after the record is created

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.

1reaction
sidferreiracommented, May 10, 2021

I believe if we had a way to overwrite

const createdQuery = Q.where(columnName('_status'), 'created')
const updatedQuery = Q.where(columnName('_status'), 'updated')

for fetchLocal is a start…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not synchronize record to exchange server error code ...
Hello, I've got Office 2016 installed on my Mac with macOS Sierra. I'm using multiple office 365 mailboxes and I'm getting a lot...
Read more >
How to solve Sync Error in Outlook for Mac | Thomas' Miniblog
Error: Could not synchronize record. Property is not valid for this object type. Error code: -19803. Solution 1: empty the cache.
Read more >
Could not synchronise record to Exchange Server : r/Office365
I've been getting the above error message multiple times over the last couple of weeks, but don't know how to fix it.
Read more >
[Fixed] How To Fix Could Not Synchronize Record Outlook ...
#1: Fix With Server Or Reset · #2: Update The Outlook for Mac · #3: Clear Your Outlook for Mac Cache · #4:...
Read more >
Implement Synchronized Data Sources Best Practices
Don't rename or change the API Name for the Sales or Service Cloud object included in the Synchronized Data Sources synchronization process. Renaming...
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