TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
220 stars 49 forks source link

Firestore Query WhereEqualsTo null ? #359

Open barrysohl opened 1 week ago

barrysohl commented 1 week ago

In the past, with Xamarin and Plugin.Firestore we were able to run queries and check for null values with LINQ like so: ICollectionReference.WhereEqualsTo( "someproperty", null )

But with Plugin.Firebase.Firestore on MAUI, this throws a NullReferenceException (see below). Is there some other way to query for fields that have null values? Thanks in advance.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Plugin.Firebase.Firestore.Platforms.iOS.Extensions.NSObjectExtensions.ToNSObject(Object this)
   at Plugin.Firebase.Firestore.Platforms.iOS.QueryWrapper.WhereEqualsTo(String field, Object value)