ability to marshal empty slices as bson [] rather than nil

XMLWordPrintableJSON

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

      If a field in a struct is a slice, and it has no elements, and it is not omit empty, then it’s BSON value is nil.

      This means that you can’t treat it like an array (e.g. use $push,) and we ran into issues with $in as well.

      In MGO these types were [], and it appears that our application depends on this.

            Assignee:
            Unassigned
            Reporter:
            Sam Kleinman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: