-
Notifications
You must be signed in to change notification settings - Fork 376
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firestore update is broken starting 5.5.1 #191
Comments
Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight. |
Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information. |
@schmidt-sebastian can you take a look? |
Hi! Thanks for sending this over. Firebase Admin 5.5.1 pulled in Firestore 0.10.x, which contains some changes to how we process nested maps, so this issue sounds pretty scary. It does, however, not reproduce for me:
This prints the following for me on 0.10.2:
and
@lm1 Can you enable logging and send us your logs? You can pass |
Closing this issue for now as we can't reproduce this. Please ping us should this happen again. |
The same testcase fails for me when using deletion sentinels in place of empty object literals, i.e.:
this produces:
and
Please re-open. |
I'm also facing this issue My database structure:
If I'm running this:
The "new" database structure is:
I'm using firebase-admin 5.8.1 |
@Ziph0n I think this behavior is actually expected, use |
@lm1 Indeed, thank you. The Firebase team might want to update their documentation. They indeed mention the "dot notation" but isn't present in the example below: https://firebase.google.com/docs/firestore/manage-data/add-data#update_fields_in_nested_objects |
It's part of the update call to update the value of the field |
This is part of the 0.11.2 Firestore release: https://github.com/googleapis/nodejs-firestore/releases/tag/v0.11.2 |
Starting with firebase-admin 5.5.1 when performing an update within firestore transaction which contains both new nested fields and deletes some nested fields in the document, the new fields are silently dropped.
For example having a document which contains objects entries.G5VnUD and users.G5VnUD, but does not contain entries.LommiL nor users.LommiL the following operation results in deletion of entries.G5VnUD and users.G5VnUD, but the new nested fields are dropped on the floor without any warning.
Issue is still present in latest 5.8.1 but does not exist in 5.5.0
The text was updated successfully, but these errors were encountered: