Skip to content
Discussion options

You must be logged in to vote

This is possible, but it isn't a good idea if you have other options.

Since SignalDB is a local-first database, it must be able to generate IDs on its own. What you could do is map the backend ID to a field in your document (let's call it remote_id) during the pull operation. During the push, you need to map it back and discard the ID generated by SignalDB before making calls to your backend.

If a document doesn't have a remote_id set, create it in the backend. Otherwise, update the existing record.

I don't recommend this approach, as it makes it difficult to verify which documents were already created in your backend. This can lead to duplicate entries. Only use this method if you cannot…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ddenev
Comment options

@maxnowack
Comment options

Answer selected by ddenev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants