Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3888

BsonDocument.equals should consider field order

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • Labels:
      None

      When comparing two BsonDocuments using the BsonDocuments.equals() method the order of the fields does not seem to be considered.

      Currently {a:1, b:1}.equals({b:1,a:1})  evaluates to true for BsonDocuments. For documents the expected behavior would be that documents are only considered to be same if the field order is the same. 

            Assignee:
            Unassigned Unassigned
            Reporter:
            kai.orend@mongodb.com Kai Orend
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: