Open danReynolds opened 2 days ago
This behavior is expected because isEqualTo
defaults to null
. The assertion is there to prompt you to provide a value rather than using null. FirebaseFirestore.instance.collection('users').where('name', isEqualTo: null);
on the other hand does not throw an error, but it's redundant. Since isEqualTo
is null by default, this is equivalent to not applying the where
clause at all.
Is there an existing issue for this?
Which plugins are affected?
Core, Database
Which platforms are affected?
iOS
Description
Filtering by
isEqualTo: null
works off of a CollectionReference like:But this is not supported using a Filter since it makes an assertion that exactly one field is not null.
I would expect that these two queries have the same behavior.
Reproducing the issue
N/A
Firebase Core version
2.27.0
Flutter Version
3.19.0
Relevant Log Output
No response
Flutter dependencies
Expand
Flutter dependencies
snippet```yaml Replace this line with the contents of your `flutter pub deps -- --style=compact`. ```
Additional context and comments
No response