ClassRegistry Class

Maintains the mapping between the name of a BIS ECClass (in "schema:class" format) and the JavaScript Entity class that implements it. Applications or modules that supply their own Entity subclasses should use registerModule or register at startup to establish their mappings.

When creating custom Entity subclasses for registration, you should:

  • Override the className property to match your ECClass name:
    public static override get className() { return "TestElement"; }
  • Do NOT override schemaName or schema - these will be wired up automatically during registration

Methods

Name Description
constructor(): ClassRegistry    
findRegisteredClass(classFullName: string): undefined | Entity Static Find a registered class by classFullName.  
getClass(classFullName: string, iModel: IModelDb): Entity Static Get the Entity class for the specified Entity className.  
register(entityClass: Entity, schema: Schema): void Static Register a single entityClass defined in the specified schema.  
registerModule(moduleObj: any, schema: Schema): void Static Register all of the classes found in the given module that derive from Entity.  

Defined in

Last Updated: 02 August, 2025