eherve / mongoose-datatable

Server side dataTable request support for mongoose
MIT License
42 stars 29 forks source link

No data returned on mongoose 5 with options.conditions #52

Open DiV666 opened 6 years ago

DiV666 commented 6 years ago

Hi,

I have updated to mongoose 5 and no results are returned when I use the options.conditions parameter

Tests made with mongoose 4.13.12 with options.conditions

{
  draw: '7',
  recordsTotal: 90,
  recordsFiltered: 90,
  data: [ ...25 Objects... ]
}

Tests made with mongoose 5.0.15 with options.conditions

{
  draw: '12',
  recordsTotal: 90,
  recordsFiltered: 90,
  data: []
}

Tests made with mongoose 5.0.15 without options.conditions

{
  draw: '5',
  recordsTotal: 2689,
  recordsFiltered: 2689,
  data: [ ...25 Objects... ]
}

Best Regards, Daniel

eherve commented 5 years ago

Hi, sorry for the very late reply...

I'm updating the plugin on version 2.0.0, this version should work with latest mongoose version. It is not yet a npm package but you can add it to your project by using : npm install --save git+ssh://git@github.com/eherve/mongoose-datatable.git

Let me know if it solves your issue.