I am trying to run the following query:
this.db.firestore
.collectionGroup('members')
.orderBy('dateModified', 'desc')
.where(firebase.firestore.FieldPath.documentId(), '==', uid)
But I get the error:
Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but 'X6yL5Ko55jSMWhhoQUO91xVYdEH3' is not because it has an odd number of segments (1).
Is the only way around this to add the document id to the document? This is not ideal as I have a lot of existing data... The document id is the uid of the firebase user.