getFromDB method
Implementation
Future<AbsExModel?> getFromDB(String mid) async {
try {
AbsExModel model = newModel(mid);
Map<String, dynamic> data = await HycopFactory.dataBase!.getData(collectionId, mid);
if (data.isEmpty) {
logger.warning('data not found $mid');
return null;
}
model.fromMap(data);
return model;
} catch (e) {
logger.severe('databaseError $e');
//throw HycopException(message: 'databaseError', exception: e as Exception);
return null;
}
}