簡體   English   中英

我可以在創建后立即獲取文檔密鑰嗎?

[英]Can I get the document key right after it is created?

添加此數據后,我希望獲得此文檔的參考。

有可能的?

await userCycleCollectionRef.doc().set({
    userUid,
    startDate,
    endDate,
});

userCycleCollectionRef.doc()立即返回一個 DocumentReference,正如您從API 文檔中看到的那樣。

const ref = userCycleCollectionRef.doc()
await ref.set({
    userUid,
    startDate,
    endDate,
});

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM