You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When including options on the comments populate (which has another populate nested inside), it returns more than specified limit and sort is not applied. If the nested populate is removed, it works as intended.
Just to be clear, my fix applies the options object to the query as expected, but does not fix the issue in #4321. I will give some thought to that issue separately and submit a PR if I have any ideas worth sharing ( It's a tough nut to crack ).
Yeah limit and populate has been a thorn in our side for a very long time. The general idea is that we'll have to fall back to doing separate queries for each doc if you use populate() with limit and you get multiple docs back.
I believe there is a bug using nested populates and options.
My current query is as follows:
When including
options
on thecomments
populate (which has another populate nested inside), it returns more than specifiedlimit
andsort
is not applied. If the nested populate is removed, it works as intended.Currently, using:
Node 10.2.1
Mongoose 5.1.2
Mongo 3.6.5
Is this a bug or am I missing something?
I believe this might be related: #4321
The text was updated successfully, but these errors were encountered: