bajankristof / nedb-promises

A dead-simple promise wrapper for nedb.
MIT License
298 stars 45 forks source link

adding new entry on update #68

Closed harvansh265 closed 1 year ago

harvansh265 commented 1 year ago

I am new to use nedb-promises and I am facing issue that , when I am updating any record that's inserting a new record with same id

bajankristof commented 1 year ago

Hi! On the file-system level, this is expected. When reading from the datastore you should still see only one document however. If you want to have only a single document in the stored file as well, you need to compact the datastore using datastore.persistence.compactDatafile() or set an auto-compaction interval using datastore.persistence. setAutocompactionInterval(interval).

stale[bot] commented 1 year 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.