Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
9173860 opened this issue Mar 4, 2020 · 6 comments
Open

Comments

@9173860
Copy link

9173860 commented Mar 4, 2020

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
Copy link

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

@bardak-dev
Copy link

any news?

@yharaskrik
Copy link

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

@yharaskrik
Copy link

Please refer to PR #509

@bardak-dev
Copy link

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

@yharaskrik
Copy link

Yup I can do that today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants