Answer the question
In order to leave comments, you need to log in
Why does the populate query to MongoDB not return the entire array of data?
Node.js application, mongoose library. When querying the database using populate, an incomplete array is returned (the first 26 records, instead of 42) . If you make the same query without populate, everything is fine
Data structure in the database:User.findById(id).populate({ path: "couriers" });
{
"_id":"5baa987cea3ee11f688e5b45",
"chatId":"",
"client":"5baa97ba2e70e016889c7b21",
"remoteId":"6d325910",
"name":"Test",
"pinCode":"1",
"createdAt":"2018-09-25T20:20:12.641Z",
"__v":0
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question