firstOrFail method
---------- FIRST OR FAIL ----------
Implementation
Future<T> firstOrFail() async {
final r = await first();
if (r == null) {
throw Exception('${model.table} record not found');
}
return r;
}
---------- FIRST OR FAIL ----------
Future<T> firstOrFail() async {
final r = await first();
if (r == null) {
throw Exception('${model.table} record not found');
}
return r;
}