nestjsx / crud

NestJs CRUD for RESTful APIs
https://github.com/nestjsx/crud/wiki
MIT License
4.1k stars 542 forks source link

Search and Filter query for getMany is not working in v5 with Mongoose #435

Open 9173860 opened 4 years ago

9173860 commented 4 years ago

Hi, Thanks for the great project~

I managed to make this working with mongoose using nest-crud-mongoose, which I believe would be able to release together for #332

I've made a basic demo with typegoose and swagger here.

But it seems that search and filter are not working. When I request for getMany with s query and enable mongoose's debug option, it turns out mongoose will just execute find with {}

I've tried using both npm installed @nestjsx/crud and git-cloned-built packages from branch v5. But the results are the same.

Also, I've dug into the crud-mongoose package, and it seems createBuilder in mongoose-crud.service.ts is not handling search or filter from parsed query. It did handle filter in options and path params, but not search or filter in query strings

Would you please have a check? @yharaskrik Thanks very much.

yharaskrik commented 4 years ago

Thanks for creating the demo. I will try and get to this as soon as I can.

bardak-dev commented 4 years ago

any news?

yharaskrik commented 4 years ago

I have a couple of free hours tonight, I will see what I can find.

yharaskrik commented 4 years ago

Please refer to PR #509

bardak-dev commented 4 years ago

@yharaskrik Thank you! Could you to add new version on nest-crud-mongoose npm until nestjsx v5 releases?

yharaskrik commented 4 years ago

Yup I can do that today.