creationix / nstore

nStore is a simple, in-process key/value database for node.js
MIT License
392 stars 31 forks source link

Issue with get all function right after saving an object to DB #47

Open erincinci opened 10 years ago

erincinci commented 10 years ago

Right after I save my object to DB, I refresh my view and I get the following value error instead of getting the object attributes as I designed. Everything seems OK in the db file itself, and if I restart my node application I start getting the right string. This event only occurs after I insert something to DB and before restarting the application.

erincinci commented 10 years ago

After debugging the code, I found that newly created object has a different structure, probably until being saved to disk (having original attributes both in 'attars' and 'dirty' objects), so that was causing the problem. How can we overcome this problem?