I am trying to filter a collection by a field value and also get all entries where the field is equal to null. Since the in operator does not support null values, I can not take the simple route and query for:
where('field', 'in', ['value', null])
I am currently solving this issue by having two queries. One getting the entries where the field is null and one getting the entries where the field equals the value:
where('field', '==', 'value')
where('field', '==', null)
But this returns me more entries than necessary, and I have to sort and merge the entries client side. I would rather have a single query return me all entries, so I can do things like pagination across the combined list, rather than paginating over both list separately.
Is there any method to accomplish this?