Queries should return a Hash w/ Indifferent Access

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Minor - P4
    • 2.0.0
    • Affects Version/s: None
    • Component/s: BSON, Public API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When writing documents to a collection, hash keys which are specified as Ruby symbols are serialized to strings.

      When the documents are retrieved from the database, a user must use strings to access the values in the document.

      It is confusing to the user and leads to mismatched code when values are stored with a symbol but then cannot be retrieved using the very same key.

      Although keys must be stored as strings per the BSON specification, it would make sense if the documents were returned as Hashes w/ indifferent access so that a string or equivalent symbol would both map to the same given value.

            Assignee:
            Durran Jordan
            Reporter:
            Tyler Brock (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: