Firestore - batch.add is not a function

前端 未结 6 1143
滥情空心
滥情空心 2020-12-24 10:31

The documentation for Firestore batch writes lists only set(), update() and delete() as permitted operations.

Is there no way

6条回答
  •  我在风中等你
    2020-12-24 11:19

    For PHP you can try :

    $batch = $db->batch();
    $newCityRef = $db->collection('cities')->newDocument();
    $batch->set($newCityRef , [ 'name'=>'New York City' ]);
    

提交回复
热议问题