Problem if filter in Distinct is nil

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 1.0.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There is a problem in the Distinct function. If the filter is nil, the distinct will not be executed:

      collection.Distinct(context.Background(), "foo.bar", nil)
      

      As a workaround I have used a blank search request:

      collection.Distinct(context.Background(), "foo.bar", bson.D{})

            Assignee:
            Kristofer Brandow (Inactive)
            Reporter:
            Robert Ressl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: