-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: 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.