Open michael-martinez opened 4 years ago
When exporting then importing, I get no problem but the export loses the Geopoint data type information (thus importing after leads to non Geopoint type being imported):
Exported:
{
"sample_data": {
"destinationCoordinates": {
"_latitude": 48.830226,
"_longitude": 2.370378
},
"__collections__": {}
}
}
Expected behavior
I am trying to upload a Geopoint data type in Node JS program but the upload is unsuccessful. I expect the Geopoint datatype to be successfully updated.
Actual behavior
Argument "data" is not a valid Document. Detected an object of type "GeoPoint" that doesn't match the expected instance (found in field destinationCoordinates). Please ensure that the Firestore types you are using are from the same NPM package.
Configuration:
Steps to reproduce the behavior
Create a test.json file:
Launch the node program:
Everything is fine if I remove the "__datatype__": "geopoint" thing except it is not stored as a Geopoint into Firestore. When I add it I am getting the above error.