G
G
gadzhi152018-09-26 13:44:20
NoSQL
gadzhi15, 2018-09-26 13:44:20

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
}

What is the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-09-26
@dimonchik2013

How to populate (join) two collections in Mongoose?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question