mongo-go-driver - PR #2364: GODRIVER-3862: Collection.Clone propegates BSONOptions

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      softprops has created PR #2364: GODRIVER-3862: Collection.Clone propegates BSONOptions in mongo-go-driver

      Issue Text:
      GODRIVER-3862

      It's not uncommon to clone a collection to set different read preference on a read path or write preference on a write path. In my cause I was storing and reading a third party struct which has json struct tags but no bson tags. I found the drivers BSONOptions.UseJSONStructTags worked up until I cloned a collection.

      The issue is that the driver does not copy this setting when Cloning collections and additionally ignores it when passed as an option to collection.Clone. This pull addresses both issues

            Assignee:
            Unassigned
            Reporter:
            TPM Jira Automations Bot
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: