-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Query Records by empty or non-empty values #6275
Comments
+1 -- esopian and I dabbled with a number of different ways of querying in order to make this work and none did... unless we're both dumb and missed something. Er go, Querying for records with a specific value.... .where({ age: 21 }) -- VS -- Querying for records which DO or DON'T even have that value in their object schema at all... .where({ age }) || .where({ !age }) || .where({ exists: age }) || .where({ age: undefined }) -- or something along those lines. None of the above work (we thought the last one should) |
+1 |
This has been logged as a FR and will be pushed to Trello in the near future. Thanks for the input! Update 07_23: we will not be using Trello but have devised a system for users to submit Feature Requests outside of issues. It will be announced as soon as we get the system in place on our end. |
+1 |
My proposal is to use a criteria modifier,
We also need to consider how this would behave in schemaless DBs where the field may not exist at all. If we want to be more specific we could add another criteria modifier to cover the case where the field doesn't exist at all such as
Any opinions about this? |
+1. Any workaround? |
Thanks for posting, @esopian. I'm a repo bot-- nice to meet you! It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message. On the other hand, if you are still waiting on a patch, please:
Thanks so much for your help! |
Reopening until someone submits a PR to the roadmap for this feature. |
+1 |
Thanks for posting, @esopian. I'm a repo bot-- nice to meet you! It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message. On the other hand, if you are still waiting on a patch, please:
Thanks so much for your help! |
|
It's on the road map. |
Is this functionality implemented or still on the road map |
Need a way to get a list of records based on whether they have a property assigned or not and not based on the actual value of the property. Tried to query with null, empty string, undefined, and false using the MongoDB adapter with no success.
Example use case: I have a collection of Invoices with a property of "paidDate". I want to get all Invoices with no paidDate set (unpaid invoices).
The text was updated successfully, but these errors were encountered: