A rather simple question but I don't have a database to test on...
If I sort on a value, will the order of my other values remain?
Say my mongoDB data looks like this
id, a
0, 1
1, 1
2, 2
3, 2
and I do sort on a, descending. Will the order of the ids remain? Like this?
id, a
2, 2
3, 2
0, 1
1, 1
On a related note, can i chain sorts after each other like this:
cursor.sort([("id",1)]).sort([("a",1)])
Will this ensure the results are sorted by a primarily and id secondarily?
Thank you for your help