entityTypeById static method

Map<int, Type> entityTypeById(
  1. Store store
)

Create a map from Entity ID to Entity type (dart class).

Implementation

static Map<int, Type> entityTypeById(Store store) {
  if (store._entityTypeById == null) {
    store._entityTypeById = HashMap<int, Type>();
    store.configuration().modelDefinition.bindings.forEach(
        (Type entity, EntityDefinition entityDef) =>
            store._entityTypeById![entityDef.model.id.id] = entity);
  }
  return store._entityTypeById!;
}