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

Querying UUID field

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hi, 

      I'm using the latest version of the Mongo Go driver, but I can't seems to find a way to query a UUID field (that I have as a string). For instance:

      `stringUUID  := "d392596d-9a86-4e55-8a47-a4b831825906"`

      `

      filter := M

      { "field": stringUUID, }

      `

      I've tried to use the `primitive.Binary` struct it the required `subType` and string as `[]byte`. However, it doesn't seems to work. 

       

      In the MongoDB, I've it as ` "field" : UUID("d392596d-9a86-4e55-8a47-a4b831825906")`

      Syed 

       

       

       

       

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            syd Syed Gillani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: