thanhlmm / refi-app

A tool to make interacting with Firestore less painful
https://refiapp.io
MIT License
606 stars 47 forks source link

Geopoint fields are incorrectly overwritten #55

Open DanMossa opened 2 years ago

DanMossa commented 2 years ago

In my document there is a map named geoPoint and it looks like

geoPoint: {
                    "latitude": 32.56,
                    "longitude": -122.00,
                }

Refi keeps showing this as a of type geoPoint. And when I manually change it to a map it still auto changes it to type geoPoint and not a map named geoPoint.

It looks like refi assumes it's of type GeoPoint if the field name is GeoPoint, which is incorrect and prevents the ability to use this :(

thanhlmm commented 2 years ago

Hi @DanMossa

Thanks for using Refi App.

image

I believe that only input with this pattern can regconite the data type is GeoPoint

Can you upload your full document (or maybe remove some sensitive field) so we can investigate this case?

DanMossa commented 2 years ago

I started with this

image

I clicked commit and then

image

It just converts it into a geopoint. Try it out

thanhlmm commented 2 years ago

I can reproduce the issue and will check to solve it asap.

The packages we use to serialize Firestore data auto-detect if a field has latitude and longitude then convert it geoPoint type