Daniele B
Daniele B

Reputation: 20442

Firestore: how to make query where field is null

In my collection I have several documents where the "token" field is null.

query := client.Collection("records").Where("token", "==", nil)

In Go, the query above returns zero documents.

What is the correct query to fetch all documents where the "token" field is null or missing?

Upvotes: 1

Views: 3858

Answers (1)

Jonathan Amsterdam
Jonathan Amsterdam

Reputation: 11

Currently a bug in the Go client. Track at https://github.com/GoogleCloudPlatform/google-cloud-go/issues/922.

Upvotes: 1

Related Questions