getSubCollection<R extends FirestoreEntity<R>> method

CollectionReference<R> getSubCollection<R extends FirestoreEntity<R>>()

Implementation

CollectionReference<R> getSubCollection<R extends FirestoreEntity<R>>() {
  assert(DogFirestoreEngine.instance.checkSubcollection<T, R>());
  var subcollectionName = DogFirestoreEngine.instance.collectionName<R>();
  return selfCollection.doc(id).collection(subcollectionName).withStructure<R>();
}