Why the request to populate MongoDB will return the entire dataset?

0 like 0 dislike
5 views
Node.js app, library mongoose. If you query the database using the populate is Returned not the full array (the first 26 entries, instead of 42) . If you do the same query without populate everything is fine

User.findById(id).populate({ path: "couriers" });

The data structure in the database:

{ "_id":"5baa987cea3ee11f688e5b45", "chatId":", "client":"5baa97ba2e70e016889c7b21", "remoteId":"6d325910", "name":"Test", "pinCode":"1", "createdAt":"2018-09-25T20:20:12.641 Z", "__v":0 }


What's the problem?
by | 5 views

1 Answer

0 like 0 dislike
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked May 22, 2019 by tgpglstbc
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Apr 1, 2019 by NiceForce
110,608 questions
257,186 answers
0 comments
28,696 users