I have a simple question. In MongoDB if a have a document with the list field, does MongoDB gurantee the ordering of the values within the list.
Note: I don’t care about the ordering of actual documents.
i.e. If I insert
{
something: somevalue,
alist: [1,2,3,a,s,d,f]
}
will the value of alist always be:
[1,2,3,a,s,d,f]
and not
[2,1,3,a,s,d,f] or
[1,2,3,a,s,f,d] or
...
[1,2,a,3,s,d,f] ..etc
Thanks,
Vackar
Yes, the array order will remain consistent as the record(s) isn’t updated.