Coder Social home page Coder Social logo

Comments (4)

goalia avatar goalia commented on May 31, 2024 1

I go into another way, no problem. Great to know it will be fix πŸ˜„

from mongoosejs-soft-delete.

passionInfinite avatar passionInfinite commented on May 31, 2024

Any steps to reproduce?

from mongoosejs-soft-delete.

goalia avatar goalia commented on May 31, 2024

npm install mongoose-paginate-v2
After try to make a request with something like this

Model.paginate({}, { offset: 30, limit: 10 }, function(err, result) {
    // result.docs
    // result.totalPages
    // result.limit - 10
    // result.offset - 30
});

I have no record return from my database but the count (number of page, number of records) still works

from mongoosejs-soft-delete.

parth7676 avatar parth7676 commented on May 31, 2024

@Goal54 The package you have used is using find() to find all the data and then applying pagination on it. So, in that case, you will get all the non soft deleted records from your database.

The best way to solve your problem, for now, will be:

  1. Remove the pagination package.
  2. Use express-paginate.
  3. And use our query methods.

we are looking into pagination and will be available into next release.

from mongoosejs-soft-delete.

Related Issues (5)

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.