[DOCS-1411] Clarifications on BSON field ordering Created: 18/Apr/13  Updated: 30/Aug/13  Resolved: 30/Aug/13

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Stephen Lee Assignee: Zack Brown
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 10 years, 24 weeks, 5 days ago

 Description   
  1. In JSON key order doesn't matter for comparison, in BSON it does (e.g. in JSON {'a': 1, 'b': 2}

    ==

    {'b': 2, 'a': 1}

    , in BSON

    {'a': 1, 'b': 2}

    !=

    {'b': 2, 'a': 1}

    )

  2. BSON is ordered but driver representations may not be
  3. The server itself does not guarantee order (e.g updating a document may change the order of its fields)
  4. The implications of 1, 2, and 3 for unique indexes and other MongoDB operations (e.g. commands where the command name must be the first field, geospatial queries and point format, etc.).


 Comments   
Comment by auto [ 30/Aug/13 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1411: edits
Branch: master
https://github.com/mongodb/docs/commit/f105d1e0dc33ccae999d7b1602700168db10f63e

Comment by auto [ 30/Aug/13 ]

Author:

{u'username': u'Zackrobat', u'name': u'Zack Brown', u'email': u'zack.brown@10gen.com'}

Message: DOCS-1411: Clarifications on BSON field ordering

Signed-off-by: Sam Kleinman <samk@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/e47ec13e5830cc1db594bccb7fe7b34ddd80128c

Comment by Bernie Hackett [ 18/Apr/13 ]

See SERVER-8288 for an example of a query where the order of the fields is significant.

Generated at Thu Feb 08 07:40:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.