question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
yharaskrikcommented, May 15, 2020

Yup I can do that today.

1reaction
yharaskrikcommented, Mar 4, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mongoose Filter Not Working With Find Method - Stack Overflow
My used module is "find" method but mongo is getting all data to me so filter is not working. What is problem ?...
Read more >
Missing type check for FilterQuery · Issue #9772 - GitHub
No transpilation error. If the current behavior is a bug, please provide ... Missing type check for FilterQuery #9772 ... Mongoose: v5.11.9.
Read more >
14 Things I Wish I'd Known When Starting with MongoDB - InfoQ
I've been a database person for an embarrassing length of time, but I only started working with MongoDB recently and there are a...
Read more >
Mongoose Tutorials: Query Casting
When you execute the query using Query#exec() or Query#then() , Mongoose casts the filter to match your schema. // Note that `_id` and...
Read more >
qhm - River Thames Conditions
Okanga, X trail isofix, Tangerine dream quantum key, Driver's seat sniff n the tears ... 3m n100 vented particulate respirator, Google search page...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found