Skip to content

[firebase-firestore] doc() does not work as expected #61

@gookhans

Description

@gookhans

Hi. Normally, collection.doc() usage (without parameter) must be creating doc with auto generate id as explained by Firebase docs.

example usage: firestore.batch().set(firestore.collection('users').doc(), {data})) ...

error: Invalid document reference. Document references must have an even number of segments
expected: it must be behaving like add() method.

I need to this feature because add() method isn't usaged inside the batch write. Is there a way to do this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions