Lookup should properly traverse Arrays

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 0.0.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The Document.Lookup method currently supports depth traversal. The implementation retrieves a document from an Array when it needs to traverse into a BSON Array, but the implementation of Arrays does not have the keys as numbered strings.

      Since we currently just slice the first element off when doing a traversal, we'll need to add an internal method to Array (such as lookupTraverse) that takes an integer as the first parameter and a variadic slice of strings for the second argument, this way we can continue to traverse. This does mean that quite a bit of Lookup will be duplicated.

              Assignee:
              Samuel Rossi (Inactive)
              Reporter:
              Kristofer Brandow (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: