Using a ReaderIterator, the current element holds onto the previous Document

XMLWordPrintableJSON

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

      When calling iterator.Next(), it does not clear out the document of the value.  Simply doing the following should be sufficient:

      itr.elem.value.d = nil
      

      The side effect this has if for values that use the document (.d) like subdocuments and arrays, if you have multiples in the source (reader), it'll never update to the current element since the previous value was already set.

            Assignee:
            Unassigned
            Reporter:
            Ryan Hullah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: