shycat
shycat

Reputation: 13

Property 'doc' does not exist on type 'AngularFirestoreCollectionGroup<Onsiteinterface>'

I can edit data in collection but if I change to Subcollection I got error. It say "Property 'doc' does not exist on type 'AngularFirestoreCollectionGroup"

 update(uid: string, data: any): Promise<void>
   {return this.Reqref.doc(uid).update(data);}

collection subcollection

Upvotes: 0

Views: 285

Answers (1)

Rajeev Tirumalasetty
Rajeev Tirumalasetty

Reputation: 352

Posting Ashish's comment as community wiki answer for visibility.

A CollectionGroup refers to all documents that are contained in a collection or subcollection with a specific collection ID, So using collection group you cannot set data all at once. You have to call individual documents to set data.

Upvotes: 1

Related Questions