let query = userRolesRef .doc(user).update( { isDeliveryPerson:true }, { merge: true } );
Last week while working on Cloud Firestore using Admin SDK, I accidentally forget to replace .update with .set with merge true option and to my surprise the query worked and document got created. I removed merge:true and then I got document not exists error. I tested it again with merge:true and document created again. I could not find anything about this in documentation. Requesting Firebase team to explain this behaviour. I posted this on stackoverflow (https://stackoverflow.com/questions/60899399/firestore-doc-update-with-merge-true) but I was advised to post here.let query = userRolesRef .doc(user).update( { isDeliveryPerson:true }, { merge: true } );
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/754eb1e8-ab3c-4fd1-a2ea-8e1c33196c83%40googlegroups.com.