find<T> method

  1. @override
Future<T?> find<T>(
  1. dynamic key, [
  2. Type? type
])
override

Finds an entity of the specified type by primary key.

Implementation

@override
Future<T?> find<T>(dynamic key, [Type? type]) async {
  return entitiesFor(type ?? T).then((entitiesForType) {
    return entitiesForType[
        key is Map ? Composite(key as Map<String, dynamic>) : key];
  });
}