hasMany method

Future<List<B>> hasMany(
  1. A model
)

Implementation

Future<List<B>> hasMany(A model) async {
  List<dynamic> result = await Collection.get(modelType: B)
      .where('${Model.typeToId(A)}_id', model.getId());

  return result.cast<B>();
}