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

How can I search in MongoDb for a field that is not null #10

Closed
janbaer opened this issue May 18, 2016 · 1 comment
Closed

How can I search in MongoDb for a field that is not null #10

janbaer opened this issue May 18, 2016 · 1 comment
Labels

Comments

@janbaer
Copy link
Owner

janbaer commented May 18, 2016

{
  field: { $ne:null }
}

If you want to search for a field that not exists, you have to use the following query:

{
  field: { $exists:false }
}
@janbaer
Copy link
Owner Author

janbaer commented May 19, 2016

#ANSWER
Antwort

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

No branches or pull requests

1 participant