techfort / LokiJS

javascript embeddable / in-memory database
http:/techfort.github.io/LokiJS
MIT License
6.73k stars 482 forks source link

Collection got empty after refresh browser #838

Closed dohoangn closed 4 years ago

dohoangn commented 4 years ago

I have Lokijs in an Vuejs app in Chrome browser. I just use standard way to create db

let db = new Loki("test", {
      autoload: true,
      autosave: true,
      autosaveInterval: 10,
      adapter: new LokiIndexedAdapter()});

Creating a collection, inserting item into collection, everything working fine. However when refreshing browser, all records in collection get lost even I wait few minutes after saving

dohoangn commented 4 years ago

Having these options seem to persist data autosaveInterval: 1000, throttledSaves: false,

stale[bot] commented 4 years ago

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.

balain commented 3 years ago

Same problem here. Any idea on what's happening or how to prevent wiping out the whole database? If this isn't fixed, the database isn't usable...