Skip to content

How to update nested fields in document without overriding? #457

Answered by mderevnin
mderevnin asked this question in Q&A
Discussion options

You must be logged in to vote

Just an update so if anyone in the future sees this, they can benefit from what I ended with.

It seems escaping field names doesn't quite work. It reports success but nothing changes in the database. Using simple field names works fine. So instead I generated a unique ID to use as the field name and kept a look up table of unique IDs to what I originally planned to put, which has characters that aren't allowed without escaping.

See https://firebase.google.com/docs/firestore/quotas#limits for more information. Under "Constraints on field paths", it describes what counts as a simple field name.

For the issue of overriding, it seems like only the very first level you can add and update witho…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@WolfgangSenff
Comment options

@mderevnin
Comment options

@mderevnin
Comment options

@mderevnin
Comment options

Answer selected by mderevnin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants