Activity

Do not refer to documents as "objects," because drivers (and MongoDB)
do not preserve the order of fields when fetching data. If the order
of objects matter, use an array.

to the style guide under the "document," item in the jargon section. I don't think there are any instances of this in the Manual (nee new docs), but I think the best course of action is to get the above comment correct, and then close this ticket, and open new issues as needed against the Manual if there are specific instances of this error.

Sam Kleinman
added a comment - Mar 30 2012 09:48:54 PM UTC I just added the following:
Do not refer to documents as "objects," because drivers (and MongoDB)
do not preserve the order of fields when fetching data. If the order
of objects matter, use an array.
to the style guide under the "document," item in the jargon section. I don't think there are any instances of this in the Manual (nee new docs), but I think the best course of action is to get the above comment correct, and then close this ticket, and open new issues as needed against the Manual if there are specific instances of this error.
Would you suggest a different process?

To be clear, this ticket was referring to things like this on the geo page:

"In order to use the index, you need to have a field in your object that is either a sub-object or array where the first 2 elements are x,y coordinates (or y,x - just be consistent; it might be advisable to use order-preserving dictionaries/hashes in your client code, to ensure consistency)."

We should never mention that we support objects in the location field (even though we must for compatibility). The docs should just tell them to use an array without any other options.

Mathias Stearn
added a comment - Apr 02 2012 10:28:29 PM UTC To be clear, this ticket was referring to things like this on the geo page:
"In order to use the index, you need to have a field in your object that is either a sub-object or array where the first 2 elements are x,y coordinates (or y,x - just be consistent; it might be advisable to use order-preserving dictionaries/hashes in your client code, to ensure consistency)."
We should never mention that we support objects in the location field (even though we must for compatibility). The docs should just tell them to use an array without any other options.