MichaelSolati / geofirestore-js

Location-based querying and filtering using Firebase Firestore.
https://geofirestore.com
MIT License
505 stars 58 forks source link

this makes where query not work on d field #171

Closed BadMask121 closed 4 years ago

BadMask121 commented 4 years ago

https://github.com/geofirestore/geofirestore-js/blob/1350bc8b579107864f597df706d49b9710928246/src/GeoQuery.ts#L165

MichaelSolati commented 4 years ago

You're not supposed to use the d field on your queries, it's supposed to be transparent and abstracted from you. So if you wanted to search for everyone let's say who is thirty you'd do .where('age', '==', 30) not .where('d.age', '==', 30).

It's intentional, maybe not documented well. But since geofirestore returns to you the d field and not the entire document with the g or l I didn't want to confuse users.