some method
Implementation
Future<List<M>> some(List<dynamic> values) async {
List<M> items = [];
for (dynamic value in values) {
M? model = await onCreate(value);
if (model == null) {
continue;
}
if ((await model.mergeAndValidate()) == null) {
continue;
}
items.add(model);
}
await Collection.get(modelType: M).saveModels(items);
return items;
}