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 ?