feathers-fletching
feathers-fletching copied to clipboard
Sort order not respected in joinQuery
trafficstars
When sorting with multiple values:
{
"$sort": {
"item_code.codeType": 1,
"item_code.netWeight": 1,
"quantity": 1
}
}
joinQuery makes the query with quantity, then applies the other 2. quantity should be applied after.
This is a limitation of how the joined sorts work. They HAVE to be sorted first due to how the joins are sorted while filtering. But I suppose we could then re-sort by quantity (and other "local" fields) manually after sorting the joins.
Yeah I am manually adding that right now, but it would be nice if the sort automatically did this.