Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cannot update backticked nested field, when it contains / (slash) #8659

Open
MarkChrisLevy opened this issue Nov 30, 2024 · 1 comment
Open

Comments

@MarkChrisLevy
Copy link

MarkChrisLevy commented Nov 30, 2024

Operating System

MacOS

Environment (if applicable)

Chrome 131

Firebase SDK Version

11.0.2

Firebase SDK Product(s)

Firestore

Project Tooling

Solid.js

Detailed Problem Description

Firestore allows to have a map field, whose keys contains slashes, e.g. abc/def/123. You can write a document from js sdk with that kind of fields and keys, however if updating doc with nested field dot notation it throws error: Paths must not contain '~', '*', '/', '[', or ']'. The docs says: A quoted field name starts and ends with the backtick character. For example, foo.`x&y` refers to the x&y field nested under the foo field.

I know that FieldPath can be used and it works with FieldPaths, but it should work also with backticks.

Steps and code to reproduce issue

updateDoc(doc(getFirestore(), "doc123"), {["abc.`def/123/455`"]: true})

@MarkChrisLevy MarkChrisLevy added new A new issue that hasn't be categoirzed as question, bug or feature request question labels Nov 30, 2024
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@MarkChrisLevy MarkChrisLevy changed the title Cannot write backticked field name if contains / (slash) Cannot write backticked nested field, when it if contains / (slash) Nov 30, 2024
@MarkChrisLevy MarkChrisLevy changed the title Cannot write backticked nested field, when it if contains / (slash) Cannot write backticked nested field, when it contains / (slash) Nov 30, 2024
@MarkChrisLevy MarkChrisLevy changed the title Cannot write backticked nested field, when it contains / (slash) Cannot update backticked nested field, when it contains / (slash) Nov 30, 2024
@jbalidiong jbalidiong added api: firestore needs-attention and removed needs-triage new A new issue that hasn't be categoirzed as question, bug or feature request labels Dec 2, 2024
@wu-hui wu-hui self-assigned this Dec 3, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants