firstOrFail method

Future<T> firstOrFail()

---------- FIRST OR FAIL ----------

Implementation

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