Git Product home page Git Product logo

Comments (8)

arnaudbesnier avatar arnaudbesnier commented on June 20, 2024

@GautierT, are you sure that result.total contains the total number of records?

If the answer is yes, I see that in the documentation, the length of records is used. Are you sure that your results.total returns an integer value?

from forest-express-mongoose.

GautierT avatar GautierT commented on June 20, 2024

Yes, i'm sure. I'm using : https://github.com/edwardhotchkiss/mongoose-paginate
And as you can see in my temporary fix if i manually pass meta : {count : results.total} pagination is working.

from forest-express-mongoose.

arnaudbesnier avatar arnaudbesnier commented on June 20, 2024

Yes, can you answer my second question? Is results.total an integer value?
What happens if you set an hardcoded value?

from forest-express-mongoose.

GautierT avatar GautierT commented on June 20, 2024

Sorry missed that one. Yes, it's an integer value.
I tried with count : 40. Does'n't work.

from forest-express-mongoose.

arnaudbesnier avatar arnaudbesnier commented on June 20, 2024

@GautierT, Ok, I got it! Thank you for the feedback.
The Serializer implementation might have change recently.

Can you try with this implementation:

const serialized = await new Serializer(Liana, Letters, results.docs, null, {}, {
     count: results.total
}).perform()
debug('serialized : %O', serialized)

from forest-express-mongoose.

GautierT avatar GautierT commented on June 20, 2024

Yes, it's working. Thanks.

from forest-express-mongoose.

arnaudbesnier avatar arnaudbesnier commented on June 20, 2024

We'll update the documentation soon on this issue.

Thanks @GautierT

🌲🌲🌲

from forest-express-mongoose.

SeyZ avatar SeyZ commented on June 20, 2024

FYI, the doc is now updated ;)

from forest-express-mongoose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.