Sort with unordered map type

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.1.0
    • Component/s: CRUD
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The SetSort() option currently accepts an interface{} value.

      But it is incorrect to use an unordered map here, because it could have unexpected behavior.

      I would expect it to return an error (or panic).

       

      The same problem exists for index keys.

       

      The error message should recommend to use bson.A.

            Assignee:
            Divjot Arora (Inactive)
            Reporter:
            Pierre Durand
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: