registerEntity<T> method

void registerEntity<T>(
  1. String tableName
)

The table of the entity class T is tableName instead of the class name. Every method follows it, whether it receives an instance or only the type T. Register before using the entity; recommended when the application is obfuscated, since class names then change from one build to the next.

Implementation

void registerEntity<T>(String tableName) => _registry[T] = tableName;