I'm already testing the new Firestore API, and I'm having some problems regarding to the documentation and the update call.
I'm trying to update a no existing document and I'm recieving an error. Obviously this is fine, because the documentation say that the update call will fail if the DocumentReference doesn't exist. However, reading the official documentation I see the next block of code:
// Update the population, creating the document if it
// does not already exist.
db.collection("cities").document("Beijing").update(
new UpdateOptions().createIfMissing(),
"population",
21500000);
I'm trying to replicate this, but I don't find the UpdateOptions call. Also, checking the different overrides methods of updatethese is no constructor for such call.
I'm using the 11.4.2 version of Firebase. Any idea of what is happening?