New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃敟 [firestore] update with FieldPath doesn't deep merge #2532
Comments
Interesting - thanks for the detailed report. I'll get this looked into. |
Hello 馃憢, to help manage issues we automatically close stale issues.
|
Thanks for reporting. Turns out the fix was simple one! For some reason it was overcomplicating FieldPaths, trying to merge objects together when it can just pass the dot notated paths to native land. |
Hey 馃憢 this issue should now be fixed in v6.0.1, thanks. [release notes] |
Issue
When specifying a field path with a firestore.FieldPath instead of a string, both
WriteBatch.update
andDocumentReference.update
fails to deep merge. For instance, given this document:...the following code...
...does exactly what I expect:
But this code does something unexpected!
Result:
Note that the inital value in the map is gone, but the separate field remains. I tried the same thing with the firebase-admin sdk, and got the expected behaviour.
Project Files
iOS
Click To Expand
ios/Podfile
:# N/A
AppDelegate.m
:// N/A
Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:5.5.6
Firebase
module(s) you're using that has the issue:Firestore
TypeScript
?Y
Think
react-native-firebase
is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: