working with local implementations of mongodb, updating a schema object always keeps the original position or index in a collection.

however, I have moved from mongodb stored locally to mlabs and i've ran into an issue where after updating an object in a collection, it's moved to be the last position of the array. How do i fix this, or is this just a feature of mlabs.

to describe the output: if the collection has 5 objects and i update an object at index 2, it should keep that position (index 2) however, mlabs changes it's index to be index 4 ( the last item in the array )

0 Answers