Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

124
Views
Firestore: ¿cómo accedo a .doc() ID de documento generado aleatoriamente?

tratando de averiguar esto. Estoy usando firestore y tratando de almacenar mis números/caracteres generados aleatoriamente cuando estoy usando .doc() al crear documentos en lugar de nombrarlos.

Ahora mi problema es que quiero hacer otra colección dentro de ese documento. Una subcolección que es. ¿Cómo hago esto? Es muy fácil cuando tengo una variable codificada porque entonces sé directamente en qué documento crearla. Pero, ¿cómo trabajo con caracteres/números generados aleatoriamente?

Aquí está todo mi asunto

 company_id: CompanyID, })``` firestore.collection('books').doc().set({ company_id: CompanyID, }) .then(() => { firestore.collection('books').doc().collection('messages').add({ text: 'hej', createdAt: firebase.firestore.FieldValue.serverTimestamp(), myIdNumber, displayName, }) }) .catch((error: string) => { console.error("Error while creating: ", error); });```
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!