Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14025

Comparison/Sort Order documentation for objects is incorrect

    XMLWordPrintableJSON

Details

    Description

      Description

      In https://docs.mongodb.com/manual/reference/bson-type-comparison-order/index.html#objects, object order is defined as:

      1. Recursively compare key-value pairs in the order that they appear within the BSON object.
      2. Compare the key field names.
      3. If the key field names are equal, compare the field values.
      4. If the field values are equal, compare the next key/value pair (return to step 1). An object without further pairs is less than an object with further pairs.

      However, before 2. is an extra step that compares the field types.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Activity

          People

            jeffrey.allen@mongodb.com Jeffrey Allen
            geert.bosch@mongodb.com Geert Bosch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3 years, 2 weeks, 2 days ago