-
Notifications
You must be signed in to change notification settings - Fork 147
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
Nested array union and remove support #1466
Comments
Hi @MaticConradi. Thank you for the request. Firestore in general has limited support for removing elements from nested arrays. If I understand your request correctly, the limitations you are experiencing are an unfortunate part of Firestore as a whole and cannot be implemented with changes to this repository alone. Here is an example of a nested array that can be removed from. A document contains a dictionary that has a key/value pair whose value is an array. In this case,
Here is an example of a nested array that cannot be removed from. A document contains an array of dictionaries with key/value pairs whose values are arrays. In this case there is no way to index into the top-level array with I realize, however, that I may not be answering your question. If that is the case, could you provide a code example that creates a document with a "nested" array that you are requesting removal support for? |
The second example is what I've been looking for. It's unfortunate that this is Firestore's underlying issue. For now I have decided to work around the issue, however I'm sure there are others looking for the same feature. Clearly it's possible to manually go into a Firestore database on Firebase for example and remove/edit/add a filed in an array of key/value pairs. I'll close this for now since it's not relevant to the NodeJS library. |
It would be great if you could "officially" request this feature so it can be prioritized along with others. Since it involves the Firestore backend and all client SDKs, it needs to be requested via support:
Thanks again for raising this feature request. |
Support for updating or removing elements inside nested arrays would be fantastic. Having to fully overwrite the document to update a single field isn't great as I fear there may be a situation where a race condition does something unexpected.
The text was updated successfully, but these errors were encountered: