Actually I am doing project using mongodb. after I update record and find all records, it change the document position. so how I avoid that problem.
Asked
Active
Viewed 319 times
1 Answers
1
The 'natural' (i.e. unsorted) order of docs in a collection can change as updates are made so if you want a specific order to the docs returned from a query you need to include a sort object in your query.

JohnnyHK
- 305,182
- 66
- 621
- 471