📜  firestore 添加到字段数组 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:32.898000             🧑  作者: Mango

代码示例1
DocumentReference washingtonRef = db.collection("cities").document("DC");

// Atomically add a new region to the "regions" array field.
washingtonRef.update("regions", FieldValue.arrayUnion("greater_virginia"));

// Atomically remove a region from the "regions" array field.
washingtonRef.update("regions", FieldValue.arrayRemove("east_coast"));