diskDB icon indicating copy to clipboard operation
diskDB copied to clipboard

Reason behind saving an array backward

Open quangld opened this issue 9 years ago • 1 comments

I'm just curious what is the reason behind saving an array backward

var articles = [article1, article2, article3]
db.articles.save(articles);
articles = db.articles.find({})

the order of articles returned will be [article3, article2, article1]

I was expected to be the same order when I get them as the same when I saved them. Thank

quangld avatar Dec 14 '16 15:12 quangld

Not the original author - but I believe the intent may have been to return the most recent saved items first. @arvindr21 maybe able to clarify if this is correct.

Relates to #20

patchfx avatar Dec 20 '16 15:12 patchfx