Comments (12)
Same question I have. @wishedy please check my issue.I described everything about it.
from mongoose-paginate-v2.
Same question I have. @wishedy please check my issue.I described everything about it.
hi,where can i find
from mongoose-paginate-v2.
from mongoose-paginate-v2.
@wishedy Here is an example,
var query = {
title: {
$in : [/Book/i]
}
};
var options = {
sort: { _id: 1},
populate: {
path: 'author',
match: {
name: 'Arthur Conan Doyle'
}
},
collation: {
locale: 'en',
strength: 2
}
};
return Book.paginate({}, options ).then((result) => {
});
from mongoose-paginate-v2.
You can follow this for using populate,
https://mongoosejs.com/docs/populate.html
from mongoose-paginate-v2.
Thanks for your advice. Because of the time difference, I am at 11 o 'clock at midnight. When I turn on the computer tomorrow, I will try. Thank you again, and the plug-in you provided, this problem has been bothering me.
from mongoose-paginate-v2.
@wishedy Thanks for using this. Feel free to open issues if you see anything.
Regarding populate, you just have to pass the populate object after understanding https://mongoosejs.com/docs/populate.html
Have a nice sleep.
from mongoose-paginate-v2.
@wishedy Hope you got it resolved.
Please reopen this thread if you have any questions.
from mongoose-paginate-v2.
@aravindnc
[populate] {Array | Object | String} - Paths which should be populated with other documents.
How can i use two populate actions?
from mongoose-paginate-v2.
@Leeiio You can pass populate object as an array. Below is an example,
let populateObj = [{
path: 'user',
model: 'User'
}, {
path: 'role',
model: 'Role'
}]
from mongoose-paginate-v2.
@aravindnc Thanks, but i can not find this usage in mongoose doc. https://mongoosejs.com/docs/api.html#query_Query-populate
from mongoose-paginate-v2.
@Leeiio Please check https://mongoosejs.com/docs/populate.html
from mongoose-paginate-v2.
Related Issues (20)
- Add paginate on subdocuments list HOT 7
- Filter with not equal operator HOT 2
- Can't match a ISODate range HOT 1
- Property 'paginateSubDocs' does not exist error when using typescipt
- customLabels: typescript HOT 2
- Populate, match and filter parent based on populate match HOT 1
- Querying a non-existing field, returns all documents, instead of returning nothing HOT 1
- Not accounting for options passed in counting documents
- How to find by subdocument HOT 3
- Update npm package to include latest changes
- Not working with mongoose 7.x HOT 11
- Filter on subdocument property HOT 2
- BUG on 1.7.2: Please verify that the package.json has a valid "main" entry HOT 12
- PaginateResult
- type PaginateDocument expects PaginateOptions as fourth argument
- Skip value must be non-negative HOT 2
- how call left join or lookup data ? HOT 1
- Implementation of query validation
- Add .paginate on Query Helpers HOT 1
- Add types for global instalation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongoose-paginate-v2.