I have a query that looks for a gameCreatedAt
that is equal to null
. However, even though there are no null
values in the collection..it still returns data o.O
Here is what the query looks like:
const query = firestore().collection('matches')
query.where('gameStartedAt', '==', null)
query.where(`lobby.${uid}`, '>', 0)
query.orderBy('createdAt', 'desc')
query.limit(1)
Here is what the data looks like:
Not sure why the query.where('gameStartedAt', '==', null)
criteria seems to get dropped silently? Was hoping someone could explain why the behavior is this way? It seemed to work in other programming languages with a NSNULL()
like in this stackoverflow but in JavaScript null
seems to just get ignored.