Closed mcconkiee closed 6 years ago
Which version of the module are you using? This should have been fixed in v0.7.0. Can you double check that and if it's not updated, try updating and running again?
package reads "version": "1.0.0",
sorry. that's 0.6.5 - let me updaet
ok, i updated and tried again
└── node-firestore-import-export@0.7.1
however, I am still having the same issue
Strange. In a test document I have, the console looks like the following (tried to name field names the same as their type):
The resulting export looks like the following (with geopoint, timestamp, and documentReference converted to a json-friendly format):
{
"h4QbyGCocxgg1kJu823S": {
"timestamp": {
"__datatype__": "timestamp",
"value": "2018-03-27T14:02:03.000Z"
},
"georeference": {
"__datatype__": "geopoint",
"value": {
"_latitude": 12.15715,
"_longitude": -158.2351784
}
},
"string": "string",
"boolean": true,
"object": {
"name": "object",
"timestamp": {
"__datatype__": "timestamp",
"value": "2018-03-21T13:23:12.000Z"
}
},
"number": 12351.342,
"array": {
"0": 1,
"1": {
"__datatype__": "timestamp",
"value": "2018-03-27T18:23:23.000Z"
}
},
"reference": {
"__datatype__": "documentReference",
"value": "organizations/oakley"
},
"__collections__": {}
}
}
The document reference should look something like
{
"field": {
"__datatype__": "documentReference",
"value": "organizations/oakley"
}
}
Do you have any timestamp or geopoint fields that don't convert either? What happens if you pass the -V flag to the command? Is that showing 0.7.1 as well?
@jloosli - completely appropriate you getting me back up - total version problem. Makes sense i think. I had exported w/ the old version and tried to import with the current. Doing a full retry with just the current solves my problem.
THANKS
Wonderful. Glad it's working for you. Let me know if you run into other problems
Is it possible to specify the datatype when importing? Specifically, GeoPoints?
Expected behavior
After import, document references should be proper firestore references
Actual behavior
After import, reference objects are actually key/values object representations of their export object
Steps to reproduce the behavior