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.

unknown top level operator: $populate

See original GitHub issue

Steps to reproduce

  • Create new application using feathers-cli
  • add feathers-mongoose
  • generate two mongoose models
  • add ref to another model, whitelist $populate in service

Expected behavior

It should return data with populate model

Actual behavior

It is throwing GeneralError with the above message

I think the issue is at service.js#101, where we are passing query object to mongoose with $populate. Omitting with _.omit(query, '$populate') is solving the problem.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
dafflcommented, Jan 12, 2019
0reactions
yashlogiccommented, Jan 11, 2019

any update?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting 'Unknown top level operator $or' - MongoDB
I have an app deployed on heroku, which keeps crashing because of this error: events.js:291 2020-12-09T16:08:01.009305+00:00 app[worker.1]: ...
Read more >
bad query: BadValue unknown top level operator: $gte - Stack ...
I tried to run it on mongodb server and received an error as following - "exception: bad query: BadValue unknown top level operator:...
Read more >
MongoDB unknown top level operator-mongodb
Well I'm having problems with aggragate of the mongo, I need to validate if in all the answers it doesn't have a field...
Read more >
Can't canonicalize query: BadValue unknown top level ...
com.mongodb.MongoException: Can't canonicalize query: BadValue unknown top level operator: $ne ... Any idea how to repair or workaround this issue? Responses (4).
Read more >
Node.js – Mongodb – unknown top level operator: $elemMatch ...
Node.js – Mongodb – unknown top level operator: $elemMatch”. mongodbmongoosenode.js. I have a collection which contains some documents as follows,
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