-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[cloud_firestore]: Multiple whereIn-Filters should be supported in a query #13407
Labels
blocked: customer-response
Waiting for customer response, e.g. more information was requested.
plugin: cloud_firestore
type: bug
Something isn't working
Comments
CLNMR
added
Needs Attention
This issue needs maintainer attention.
type: bug
Something isn't working
labels
Sep 25, 2024
I'm unable to reproduce this issue. Can you try with FF latest versions? |
SelaseKay
added
blocked: customer-response
Waiting for customer response, e.g. more information was requested.
plugin: cloud_firestore
and removed
Needs Attention
This issue needs maintainer attention.
labels
Sep 26, 2024
I did, the problem still persists. Here is a more complete example to reproduce the issue:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
blocked: customer-response
Waiting for customer response, e.g. more information was requested.
plugin: cloud_firestore
type: bug
Something isn't working
Is there an existing issue for this?
Which plugins are affected?
Cloud Functions
Which platforms are affected?
Android, iOS, Web
Description
When I send a query to the cloud_firestore package (v. 4.17.5) with multiple
whereIn
filters, I get an error that only onewhereIn
filter is allowed ("You cannot use 'whereIn' filters more than once.").This is due to the
assert(!hasIn, "You cannot use 'whereIn' filters more than once.");
in line 768 of "cloud_firestore-4.17.5/lib/src/query.dart".But: Firebase supports multiple
whereIn
filters, as long as the DNF has at most 30 OR-clauses.This does work in the googleapis 12.0.0 package for Dart.
Resolution approach: Remove the assert mentioned above. Instead, keep count of the length of the DNF, and assert that it is not more than 30.
Reproducing the issue
Firebase Core version
2.32.0
Flutter Version
3.22.1
Relevant Log Output
Flutter dependencies
Expand
Flutter dependencies
snippetAdditional context and comments
No response
The text was updated successfully, but these errors were encountered: