0
import { FieldPath } from '@angular/fire/firestore/'

 _find(idQuestion: string): Observable<QuerySnapshot<any>> {
    return this.firestore.collectionGroup<any>(QuestionService.QUESTION_PATH, ref => {
      return ref.where(FieldPath.documentId(), '==', idQuestion);
    }).get();
  }

i get this error 'FieldPath' only refers to a type but is used as a value here.

  • Firestore does not support that kind of query. You will need a workaround, which normally involves putting the document ID in a field of each document, and using that field as a filter. – Doug Stevenson Aug 25 '21 at 01:25

0 Answers0