getEntityRepository<O extends Object> method

  1. @override
EntityRepository<O>? getEntityRepository<O extends Object>({
  1. O? obj,
  2. Type? type,
  3. String? name,
  4. String? tableName,
})
override

Implementation

@override
EntityRepository<O>? getEntityRepository<O extends Object>({
  O? obj,
  Type? type,
  String? name,
  String? tableName,
}) {
  if (isClosed) return null;

  if (_callingGetEntityRepository) return null;
  _callingGetEntityRepository = true;

  try {
    return _getEntityRepositoryImpl<O>(
          obj: obj,
          type: type,
          name: name,
          tableName: tableName,
        ) ??
        EntityRepositoryProvider.globalProvider.getEntityRepository<O>(
          obj: obj,
          type: type,
          name: name,
        );
  } finally {
    _callingGetEntityRepository = false;
  }
}