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 use update to add/update to sync a bulk of documents in a collection. But it throws an error:
Error: Trying to update unsynced document. Please save the document first by using insert() or addMany()
I get a huge data and assign this data to a specific collection. I use collection.update() method to do this. Problem is, if not found, is not creating a new one. Is there a way to do this? Or is there a known workaround?
The text was updated successfully, but these errors were encountered:
If your docs have not yet been inserted into loki database and do not have a $loki id, you need to insert them first.
Loki does not (yet?) have upserts but this has been requested in #158. I suppose any upsert functionality (in LokiJS or LokiJS2) could allow keying off $loki or unique indices.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I use update to add/update to sync a bulk of documents in a collection. But it throws an error:
Error: Trying to update unsynced document. Please save the document first by using insert() or addMany()
I get a huge data and assign this data to a specific collection. I use collection.update() method to do this. Problem is, if not found, is not creating a new one. Is there a way to do this? Or is there a known workaround?
The text was updated successfully, but these errors were encountered: