NativeScript / firebase

Modular Firebase 🔥 implementation for NativeScript. Supports both iOS & Android platforms for all Firebase services.
https://docs.nativescript.org/plugins/firebase-core.html
Apache License 2.0
56 stars 49 forks source link

[firebase-firestore] FieldValue doesn't work inside the batch write #62

Closed gookhans closed 2 years ago

gookhans commented 2 years ago

example:

   firestore.batch().set(exampleDoc, {
            date: FieldValue.serverTimestamp()
        }) ...

This create the empty map object in the document like this: date: {}. This problem exist in the all FieldValue methods on batch write. serverTimestamp, increment, arrayUnion.. and probably exist on GeoPoint.

it seems like, set() and update() method which are inside the batchwrite have different data-serialize stages compared to the normal set(), update() methods

triniwiz commented 2 years ago

Thanks, they seem to be using the wrong serialize