Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-909

Problem if filter in Distinct is nil

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 1.0.0
    • None
    • None

    Description

      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{})

      Attachments

        Activity

          People

            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            r.ressl Robert Ressl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: