BloomModelRegistry class
Registry holding ModelMeta metadata definitions for migration generation.
BloomModelRegistry acts as a central store for @BloomModel entity metadata descriptors,
grouping them by application namespace (appLabel). Used by schema generators and CLI tooling
to calculate table schemas, relations, and dependency ordering.
Example:
final registry = BloomModelRegistry.instance;
// Register model metadata
registry.register(UserModelMeta);
registry.register(PostModelMeta);
// Retrieve models for an app
final blogModels = registry.getModelsForApp('blog');
// Retrieve all registered models across apps
final all = registry.allModels;
Properties
Methods
-
clear(
) → void - Clears all registered models from the registry.
-
getModelsForApp(
String appLabel) → List< ModelMeta> -
Retrieves an unmodifiable list of registered
ModelMetadefinitions for a specificappLabel. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
ModelMeta meta) → void -
Registers a
ModelMetadefinition into the registry under itsModelMeta.appLabel. -
registerAll(
Iterable< ModelMeta> metas) → void -
Registers multiple
ModelMetadefinitions in bulk. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → BloomModelRegistry
-
The global singleton BloomModelRegistry instance.
final