Open2021/10/18にコメント追加1Firestoreのオペレーションメモportground2021/10/18 ドキュメントが存在するかどうか確認 existsを用いる https://firebase.google.com/docs/firestore/query-data/get-data#get_a_document 配列のフィールドに値を追加 arrayUnion()を用いる。 https://firebase.google.com/docs/firestore/manage-data/add-data#update_elements_in_an_array arrayUnion() は要素を配列に追加しますが、追加されるのはまだ存在しない要素のみです。
portground2021/10/18 ドキュメントが存在するかどうか確認 existsを用いる https://firebase.google.com/docs/firestore/query-data/get-data#get_a_document 配列のフィールドに値を追加 arrayUnion()を用いる。 https://firebase.google.com/docs/firestore/manage-data/add-data#update_elements_in_an_array arrayUnion() は要素を配列に追加しますが、追加されるのはまだ存在しない要素のみです。