Priority: Major - P3
Resolution: Works as Designed
Affects Version/s: 3.4.4
Fix Version/s: None
Component/s: Aggregation Framework
I have 2 collections:
- Foo (_id, bars)
- Bar (_id)
`bars` is the array of `Bar`'s ObjectId.
I would like to use `lookup` to get the array of `Bar` in EXACTLY order that the Id stored in `bars`.
Everything are ok, UNTIL I $push another Bar's ObjectId to BEGIN of the `bars` array. The $lookup will returns the array which the new one is in the end of array, NOT begin of array as my expectation.
=> A, B
But, after $push C_id to BEGIN of array:
=> A, B, C
And so on for D_id => A, B, C, D
My expectation is: A, B, C, D.