Skip to content
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

⬆️ Mongoose v7 Support #454

Open
2 tasks
mdaronco opened this issue Dec 24, 2023 · 0 comments
Open
2 tasks

⬆️ Mongoose v7 Support #454

mdaronco opened this issue Dec 24, 2023 · 0 comments

Comments

@mdaronco
Copy link

mdaronco commented Dec 24, 2023

Steps to reproduce

Execute a programmatic call to a feathers-mongoose service using the $limit parameter:

const res = await this.app.service('my-service').find({
    query: { $limit: 1, }
}); // an error is thrown by Mongoose

(First please check that this issue is not already solved as described
here
)

  • Tell us what broke. The more detailed the better.
  • If you can, please create a simple example that reproduces the issue and link to a gist, jsbin, repo, etc.

Expected behavior

Mongoose should not throw an error up to the caller.

Actual behavior

The following error is thrown by Mongoose version 7.x:

MongoServerError: unknown top level operator: $limit. If you have a field name that starts with a '$' symbol, consider using $getField or $setField.

when calling a Feathers service with the query.$limit parameter specified.

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working):

"@feathersjs/errors": "^5.0.9",
"@feathersjs/express": "^4.5.18",
"@feathersjs/feathers": "^4.5.12",
"@feathersjs/transport-commons": "^4.5.18",
"feathers-mongoose": "^8.5.1",
"mongoose": "^7.6.3",

NodeJS version: v20.10.0

Operating System: MacOS Sonoma 14.1.2 (23B92)

Browser Version: (N/A) Chrome Version 119.0.6045.199 (Official Build) (arm64)

React Native Version: N/A

Module Loader: commonjs

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

1 participant